-1

I need to save figures with many data (10.000 points per figure or more...) in lower resolution, to open them with the pdf viewer more quickly. I've heard that a proper combination of rasterized = True and dpi should be used in pylab.savefig.

What are these arguments? others may be used within savefig for this purpose? Please give a clear example

PD: I have PYTHON 2.7

4

1 回答 1

1

After ploting or when you get the axis available:

pylab.gca().set_rasterized(True)

or for every axis ax you know

ax.set_rasterized(True)

Finally

pylab.savefig(file_name, dpi=your_choice)

where dpi could be 80, 160, 300, 600, etc.

于 2014-05-21T18:36:40.203 回答