7
$\begingroup$

Context

When I plot

pl = ComplexPlot[1/(x^2 + 1), {x, -2 - 2 I, 2 + 2 I}, 
  ColorFunction -> {ColorData["RedBlueTones"], "CyclicLogAbsArg"}]

I get this image

enter image description here

which shows some (admittedly minor) defects

enter image description here

Question

How to improve quality of ComplexPlot contours?

I have tried adding the Options PlotPoints -> 150, WorkingPrecision -> 40 but it did not improve things.

I have also tried this postprocessing but it did not work.

$\endgroup$
1
  • 10
    $\begingroup$ Try cranking up RasterSize, e.g. RasterSize -> 900. $\endgroup$ – J. M.'s torpor Feb 2 at 8:38
6
$\begingroup$

Since this option is not in the documentation, @J.M.'s comment should be in an answer:

Try cranking up RasterSize, e.g. RasterSize -> 900. – J. M.'s ennui♦ 14 hours ago

ComplexPlot[1/(x^2 + 1), {x, -2 - 2 I, 2 + 2 I}, 
 ColorFunction -> {ColorData["RedBlueTones"], "CyclicLogAbsArg"}, 
 RasterSize -> 900]

plot

Crank it up more, if dissatisfied.

One might discover the option by pondering the undocumented things in:

ComplexPlot // Options
(*  {..., RasterSize -> Automatic,...}  *)

It's a long list, though.


Note by J.M.:

The PlotPoints/MaxRecursion settings do not affect the resolution of the domain coloring plot here. Instead, they only affect the resolution of the boundary (as rendered with BoundaryStyle) and mesh (as rendered with Mesh/MeshFunctions/MeshStyle).

RasterSize is independent of these, and controls the fineness of the sampling of the domain coloring image itself. It could certainly be argued that it should either be documented, or should at least have a relation with the more natural PlotPoints option.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.