Default dpi for savefig

Hi,

    >>>>>>> >>>>> "David" == David Huard <david.huard@...287...>
    >>>>>>> writes:
    >>
    > Hi, I'm a little bit lost with respect to setting the
    > resolution of images saved in png. The matplotlibrc file
    > sets the dpi to 80, but the default keyword argument of
    > savefig is set to 150. Thus, changing the rc setting to
    > dpi=300 does not modify savefig's default behaviour. Is
    > there a way to set a default dpi that would be used when
    > calling savefig ?
    >>
    >>
    >> Have you tried modifying the rc setting
    >>
    >> savefig.dpi : 100 # figure dots per inch

    > On a related issue: when exporting a figure from the
    > tkagg backend (using the appropriate button) to PNG, the
    > dpi is arbitrirarily set to 300 (see backend_tkagg.py in
    > NavigationToolbar2TkAgg.save_figure):

    > self.canvas.print_figure(fname, dpi=300)

    > I think it should honor the savefig.dpi rc setting:

    > self.canvas.print_figure(fname,
    > 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