# Complex region plot

How do I plot the following two sets in the complex plane: $$C=\{z\in\mathbb{C}|z^4\in[0,16]\}$$ and the set of solutions of equation $$Re(\frac{2z+1}{z+1})>0$$

• You should to submit bug reports to WTS: both ComplexRegionPlot[ Re[(2 z + 1)/(z + 1)] > 0, {z, -20 - 20*I, 20 + 20*I}] and ComplexContourPlot[ Im[z^4] == 0 && Re[z^4] >= 0 && Re[z^4] <= 10, {z, -5 - 5*I, 5 + 5*I}, PlotPoints -> 50] produce wrong results in 13.3.1 on Windows 10. Commented Nov 24, 2023 at 18:53
• @user64494, there is no bug here and nothing to report. Either plot a smaller region, ComplexRegionPlot[Re[(2 z + 1)/(z + 1)] > 0, {z, 2}] or increase the number of points, ComplexRegionPlot[Re[(2 z + 1)/(z + 1)] > 0, {z, 20}, PlotPoints -> 100]. And your second example doesn't even make any sense (read the documentation on how to use ComplexContourPlot). Commented Nov 24, 2023 at 20:15
• Could you convert to 2D for the first set? red = Reduce[0 <= z^4 <= 16, z, Complexes]; twoD = red /. {Re[z] -> x, Im[z] -> y}; reg = ImplicitRegion[twoD, {x, y}]; [RegionPlot[reg]]
– ydd
Commented Nov 24, 2023 at 20:36
• @Domen: My second example does make sense: $C=\{z\in\mathbb{C}|z^4\in[0,16]\}$ is a co-lmage of the segment. This is a one-dimensional set in the complex plane so ComplexContourPlot should to draw it. Commented Nov 24, 2023 at 21:07
• Domen: $C=[-2,2]\cup[-2i,2i]$ Commented Nov 24, 2023 at 21:16

ComplexRegionPlot[Re[(2 z + 1)/(z + 1)] > 0 && Abs[z^4] < 16, {z, 3}]


Read @Domen's comment that there might be some problems if you use larger region of plot which should be compensated by larger number of plot points by setting, say, PlotPoints -> 200.

To depict the regions separately replace && with , in the above code to get:

If the first set was not $$|z^4|\in[0,16]$$ but rather $$z^4\in[0,16]$$ then you can depict it as intersection of blue region with orange lines:

ComplexRegionPlot[0 <= Re[z^4] <= 16, {z, 3}, PlotPoints -> 200];
ContourPlot[{0, Im[z^4 /. z -> a + I b] == 0}, {a, -3, 3}, {b, -3, 3},
PlotPoints -> 200];
Show[%%, %]


Yet another method which only depicts the actual intersection:

Reduce[0 <= Re[z^4] <= 16 && Im[z^4] == 0 /. z -> a + I b //
ComplexExpand, Reals];
Region[ImplicitRegion[%, {a, b}], Frame -> True, PlotRange -> 3]


• Did you read "plot the following two sets in the complex plane" in the question? Pay your attention to "two sets". Commented Nov 24, 2023 at 21:03
• Hope you understand that Abs[z^4] < 16 is not $C=\{z\in\mathbb{C}|z^4\in[0,16]\}$. Don't hurry and give wrong answers. Commented Nov 24, 2023 at 21:12
• 0 <= z^4 <= 16 means that Im[z^4] == 0 and 0 <= Re[z^4] <= 16. Here we using ContourPlot+ RegionFunction to do this.
c = Block[{z = x + I*y},
ContourPlot[Im[z^4] == 0, {x, -10, 10}, {y, -10, 10},
PlotPoints -> 50, MaxRecursion -> 4,
RegionFunction -> Function[{x, y}, Evaluate[0 <= Re[z^4] <= 16]]]]

• The same as using ComplexContourPlot+ RegionFunction
c=ComplexContourPlot[Im[z^4] == 0, {z, 10},
RegionFunction -> Function[{z}, 0 <= Re[z^4] <= 16],
PlotPoints -> 60, MaxRecursion -> 4]


• ReginPlot can also draw the region Re[(2 z + 1)/(z + 1)] > 0.
d = Block[{z = x + I*y},
RegionPlot[
Re[(2 z + 1)/(z + 1)] > 0 // Evaluate, {x, -10, 10}, {y, -10, 10},
PlotPoints -> 50, MaxRecursion -> 4]]


Show[c,d]