Skip to content

Instantly share code, notes, and snippets.

@sguzman
Created September 10, 2021 00:13
Show Gist options
  • Save sguzman/a210ca31ed497562a7cc6d15e0e37177 to your computer and use it in GitHub Desktop.
Save sguzman/a210ca31ed497562a7cc6d15e0e37177 to your computer and use it in GitHub Desktop.
Trying out the complex function feature in mathematica and graphing a function with vectors indicated
With[{
limit = 2,
f = Function[z, z^3 - z]
},
Show[{
ComplexPlot[f[z]
, {z, limit + limit I, -limit - limit I}
, Mesh -> {Range[-10, 10, .5], Range[-10, 10, .5]}
, MeshFunctions -> {Re[#2] &, Im[#2] &}
, MeshStyle -> {White, Black}
, PlotPoints -> 100
, PlotTheme -> "Business"
, PlotLegends -> Automatic
],
StreamPlot[ReIm[f[x + I y]], {x, -limit, limit}, {y, -limit, limit}]
}]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment