On changing the default tick pad

Whilst agreeing with Kaushik's sentiments on the greatness of matplotlib, I thought his example plot nicely illustrates a layout wart that I think is easily fixed by changing the default xtick.major.pad, xtick.minor.pad, ytick.major.pad and ytick.minor.pad values from 4 to 6.
As well as preventing the x- and y-axis labels running into each other in Kaushik's example, the most common case of a 2D plot with 0 lower bound on both the x- and y-axes [e.g. plot(rand(10))] looks better with the default font when pad=6. Just to bolster my case, according to the gestalt theory "Law of Proximity" <http://en.wikipedia.org/wiki/Gestalt_psychology>, the labels, which are currently closer to each other at the axis intersection than to the axes themselves become separated enough from one another so that they become visually associated with the axes in this region.

As an aside, I went looking for Matlab plotting examples and some appear to match the pad=4 padding whereas others are more like pad=6.

Of course I shall change this in my matplotlibrc file. I just thought I'd see if I could provoke a revolution,

Gary R.

Yes indeed.
I would like to see examples justifying the current default.
Alan Isaac
(another user)

···

On 3/21/2009 11:33 PM Gary Ruben apparently wrote:

Whilst agreeing with Kaushik's sentiments on the greatness of matplotlib, I thought his example plot nicely illustrates a layout wart that I think is easily fixed by changing the default xtick.major.pad, xtick.minor.pad, ytick.major.pad and ytick.minor.pad values from 4 to 6.
As well as preventing the x- and y-axis labels running into each other in Kaushik's example, the most common case of a 2D plot with 0 lower bound on both the x- and y-axes [e.g. plot(rand(10))] looks better with the default font when pad=6.

I tend to agree -- but worry that such a global change may have unintended consequences.

I'm pretty tight on time at the moment, but one way to test this theory would be to run examples/test/backend_driver.py with the new settings. This will generate output for most of the examples. Then using an image viewing tool like gthumb or something, go through all the examples and make sure things get better in all cases, and never worse. Let us know about the worse ones to see if they have easy workarounds.

If they mostly look good, I think we should consider changing the default for new non-maintenance versions going forward.

Cheers,
Mike

Alan G Isaac wrote:

···

On 3/21/2009 11:33 PM Gary Ruben apparently wrote:
  

Whilst agreeing with Kaushik's sentiments on the greatness of matplotlib, I thought his example plot nicely illustrates a layout wart that I think is easily fixed by changing the default xtick.major.pad, xtick.minor.pad, ytick.major.pad and ytick.minor.pad values from 4 to 6.
As well as preventing the x- and y-axis labels running into each other in Kaushik's example, the most common case of a 2D plot with 0 lower bound on both the x- and y-axes [e.g. plot(rand(10))] looks better with the default font when pad=6.
    
Yes indeed.
I would like to see examples justifying the current default.
Alan Isaac
(another user)

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA