Setting default labelpad

Hi Matplotlib-users,

I found it was useful to be able to change the default ‘Axis.labelpad’ parameter, since this value didn’t scale when changing the default figure size (in my opinion its easier to prepare figures for publication assuming they’ll need to fit in a 1-column figure). I don’t consider myself experienced enough to attempt to contribute a patch, but nevertheless here is the hack I used in case anyone has a similar problem:

axis.py, line 652:

original: self.labelpad = 5
changed : self.labelpad = rcParams[‘axes.labelpad’]

Then, in rcsetup.py, I added the line (at 578):

'axes.labelpad' :        [5.0, validate_float], 

This lets you put

axes.labelpad : 3

for instance, in your matplotlibrc to change the default label padding.

Anyways, not sure if this is the right mailing list for this type of thing, but just thought I’d contribute it nevertheless.

Best,

– Peter