# RegionFunction is not working for ComplexPlot

Bug introduced in version 13.0

I'm very new to mathematica and I've just begun plotting colorplots for Complex functions. Currently, I'm trying to set the output to be only restricted to the unit disk (|z|<1) and I stumbled upon RegionFunction. However it seems, the following sample code under RegionPlot from Mathematica:

Table[ComplexPlot[Exp[-z] Sin[3 z], {z, -2 - 2 I, 2 + 2 I},
PlotPoints -> 50, MaxRecursion -> mr,
RegionFunction -> Function[z, Abs[z] <= 0.5]], {mr, 0, 2}]


does not seem to work. Am I forgetting something or does RegionFunction not apply for Complex Functions?

• It works for me on V 13.0.1 screen shot !Mathematica graphics unless you mean something else by does not seem to work May 15, 2022 at 8:00
• On v12.2.0, Win7-x64, I run ComplexPlot[Exp[-z] Sin[3 z], {z, -2 - 2 I, 2 + 2 I}, PlotPoints -> 50, MaxRecursion -> 4, RegionFunction -> Function[z, Abs[z] <= 1]] to get this output.
– Syed
May 15, 2022 at 8:33
• It must be a bug. The RegionFunction in ComplexPlot does not work in 13.0.1. May 15, 2022 at 9:40
• The bug appears to have been introduced in v13.0 May 15, 2022 at 13:08

It must be a bug. Here is a working around.

ComplexPlot[Exp[-z] Sin[3 z], {z, -2 - 2 I, 2 + 2 I},
PlotPoints -> 50, MaxRecursion -> 2,
MeshFunctions -> Function[{z}, Abs[z]], Mesh -> {{.5}},


Another example in document also can not work in 13.0.1 and here we still using Mesh.

ComplexPlot[(z^2 + 1)/(z^2 - 1), {z, -2 - 2 I, 2 + 2 I},
RegionFunction -> Function[{z, f}, 1 <= Abs[f] <= 2]]

ComplexPlot[(z^2 + 1)/(z^2 - 1), {z, -2 - 2 I, 2 + 2 I},
PlotPoints -> 80, MaxRecursion -> 4,
MeshFunctions -> Function[{z, f}, Abs[f]], Mesh -> {{1, 2}},