Closed Thomas-Ulrich closed 2 years ago
I tested this a bit as I was not sure what would happen if you had kwargs = {"rasterized":False}
and it look like it works. It would be good to document this somewhere although I imagine that there are very few times this would not be the desired behavior for pcolor plots. Are the other plot types (e.g. imshow
) also rasterized by default? Are there other plots we may want to rasterize?
Thanks @Thomas-Ulrich, this is very useful. I agree we should document this since it wasn't clear to me at first how to use it, but I think idea is that if the pcolor plot is made this way, you can then do savefig('filename.svg')
, for example, and it saves an svg file in which the labels use vector graphics but the field plotted is still rasterized.
I tried a quick experiment and the rasterized=True
option can also be added to imshow
commands with similar advantage, although the svg file made without this option is already much smaller than one made with pcolor
.
I definitely think we should default to rasterization when it makes sense.
I will open a separate PR for imshow
.
as discussed in https://github.com/clawpack/visclaw/issues/284