p1 = ComplexPlot3D[(z^2 + 1)/(z^2 - 1), {z, -2 - 2 I, 2 + 2 I},
PlotTheme -> "Detailed"]
Export["plot.png", p1]
When I export the plot, I have redundat spaces. How to reduce the spaces as optimal?
I tried borrowing a technique from 21031:
p2 = ComplexPlot3D[(z^2 + 1)/(z^2 - 1), {z, -2 - 2 I, 2 + 2 I},
PlotTheme -> "Detailed", Method -> {"ShrinkWrap" -> True}]
but that didn't change much.
Then I tried:
p3 = ImageCrop[Rasterize[p2, ImageResolution -> 300]]
Export["C:/plot3.png", p3]
which looks ok.
Without Rasterizing
Using SphericalRegion->False
:
p4 = ComplexPlot3D[(z^2 + 1)/(z^2 - 1), {z, -2 - 2 I, 2 + 2 I},
PlotTheme -> "Detailed", SphericalRegion -> False]
Export["C:/plot.png", p4]
Method -> {"ShrinkWrap" -> True}
combined with ImagePadding -> None
works well.
$\endgroup$
Commented
Mar 20 at 15:56
Trim Bounding Box
$\endgroup$Trim Bounding Box
instead of right click? Because I will export the figure via commandExport
$\endgroup$