|
From: John H. <jdh...@ac...> - 2006-09-13 14:00:42
|
>>>>> "Yannick" == Yannick Copin <y....@ip...> writes:
Yannick> Hi,
>>>>>>> >>>>> "David" == David Huard <dav...@gm...>
>>>>>>> writes:
>>
David> Hi, I'm a little bit lost with respect to setting the
David> resolution of images saved in png. The matplotlibrc file
David> sets the dpi to 80, but the default keyword argument of
David> savefig is set to 150. Thus, changing the rc setting to
David> dpi=300 does not modify savefig's default behaviour. Is
David> there a way to set a default dpi that would be used when
David> calling savefig ?
>>
>>
>> Have you tried modifying the rc setting
>>
>> savefig.dpi : 100 # figure dots per inch
Yannick> On a related issue: when exporting a figure from the
Yannick> tkagg backend (using the appropriate button) to PNG, the
Yannick> dpi is arbitrirarily set to 300 (see backend_tkagg.py in
Yannick> NavigationToolbar2TkAgg.save_figure):
Yannick> self.canvas.print_figure(fname, dpi=300)
Yannick> I think it should honor the savefig.dpi rc setting:
Yannick> self.canvas.print_figure(fname,
Yannick> dpi=rcParams['savefig.dpi'])
Yep -- this is a bug in my view. pylab.savefig and fig.avefig respect
the setting, but canvas.print_figure did not. I updated the following
backends:
Sending matplotlib/lib/matplotlib/backend_bases.py
Sending matplotlib/lib/matplotlib/backends/backend_agg.py
Sending matplotlib/lib/matplotlib/backends/backend_fltkagg.py
Sending matplotlib/lib/matplotlib/backends/backend_gtk.py
Sending matplotlib/lib/matplotlib/backends/backend_gtkagg.py
Sending matplotlib/lib/matplotlib/backends/backend_qt4agg.py
Sending matplotlib/lib/matplotlib/backends/backend_qtagg.py
Sending matplotlib/lib/matplotlib/backends/backend_template.py
Sending matplotlib/lib/matplotlib/backends/backend_tkagg.py
Sending matplotlib/lib/matplotlib/backends/backend_wx.py
Sending matplotlib/lib/matplotlib/backends/backend_wxagg.py
Sending matplotlib/lib/matplotlib/figure.py
Those of you with svn access please give it a test drive on your
favorite backends to make sure it is behaving properly. I was able to
test several...
JDH
|