preserving transparency in eps

Chuck Pepe-Ranney <cpepera@...2681...> writes:

The postscript format does not support transparency. This is not a
matplotlib limitation but a postscript limitation. The best solution
is to save your matplotlib figures as pdf, [...]

Thanks, I guess my problem is that I am using the latex prosper
package to make presentation slides but I cannot compile prosper
documents with pdflatex [...]

You could try creating pdf output from matplotlib and converting it to
ps using ps2ps2, which will flatten the transparent objects into one big

You may need to tweak the ps2write parameters, especially the output
resolution, to find the best tradeoff between file size and quality.


Jouni K. Sepp�nen

If you need to stick to eps, another option is to use rasterization
feature of the matplotlib itself. This way you can keep part of plot
in vector format (e.g., texts, lines, etc ) while rasterizing others.
Of course this solution only works if the "quality" of those being
rasterized is not very important.

The rasterization in the ps backend works in a way that all the artist
whose zorder is smaller than the specified value are rasterized while
those with larger zorder are not.