I usually use ax.set_rasterized(True) to rasterize the figure so that it could handle transparency when saved as in eps format, but the rasterization also blurs the axis labels and ticklabels, so is there a way to rasterize only patches within the axis rather than the whole figure? or is there a better around for exporting eps format with transparency? Thanks.
I usually use ax.set_rasterized(True) to rasterize the figure so that it could handle transparency
Share
As matplotlib Artists can be rasterized, any class derived from Artist (http://matplotlib.sourceforge.net/api/artist_api.html) can be rasterized with the keyword
rasterizedset toTrue. So you can only rasterize your patches.I just tried some combinations and it seems to work. However the quality seems to be not very good (see also http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg13276.html).
I converted the
epsto png to show it in the browser:See also: How to save figures to pdf as raster images in matplotlib.