I have some complex graphs made using matplotlib. Saving them to a pdf using the savefig command uses a vector format, and the pdf takes ages to open. Is there any way to save the figure to pdf as a raster image to get around this problem?
You can force individual figure elements to be rasterized like this:
text(1,1,'foobar',rasterized=True)
1.4m articles
1.4m replys
5 comments
57.0k users