Consider this example:
f[x_] := -I*2*x + 3*x^2
which is a complex function defined on a complex plane $x=x_r+ix_i$
It is convenient to plot the contour of its real part Re[f] with
ListContourPlot[Re[Table[ComplexExpand[f[xr + I*xi]], {xr, 0, 0.2, 0.01}, {xi, -0.05,
0.05, 0.001}]]]
But sometimes we want to only show the contour for a certain value with a legend for the specific value. For example, how can I only plot the contour for Re[f]=0 with a legend for it?
I naively tried as follows, but it didn't work.
ListContourPlot[Re[Table[ComplexExpand[f[xr + I*xi]], {xr, 0, 0.2, 0.01}, {xi, -0.05,
0.05, 0.001}]] == 0]
Thank you for any help.
ContourPlot[ Re[ComplexExpand[f[xr + I*xi]]] == 0, {xr, 0, 0.2}, {xi, -0.05, 0.05}]
$\endgroup$ListContourPlot
. $\endgroup$