|
From: Eric F. <ef...@ha...> - 2005-11-16 16:15:33
|
Christian,
Insert
rcParams['tick.major.pad'] = 12
as the third line in your script, or change the value in your
matplotlibrc file.
Eric
> For talks I like to prepare eps figures which I embed in my latex-based
> slides. For slides, huge font sizes are a must, hence I like to use
> large fonts for tick mark labels and axis labels. My problem: For the
> axis labels, matplolib (or the PS backend?) is apparently not
> adjusting (or rather: under-adjusting) the distance between axis and
> axis label.
>
> Is there a way to adjust the distance between an axis and its label?
> If not, then where in the code is the distance calculated, scaled and
> set? I have dug through the code, but could not find it due
> to lack of object-oriented programming experience, I guess.
>
> Here is an example of what I mean. The x-axis labels comes out
> sort of okay, but the y-axis label is to close to the y axis.
>
> #!/usr/bin/python
> from pylab import *
> from matplotlib import rcParams
>
> plot([1,2,3,4], [1,4,9,16], 'ro')
> xlabel("something",size=30)
> ylabel("something else",size=30)
> xlabels = getp(gca(), 'xticklabels')
> setp(xlabels, size=25)
> ylabels = getp(gca(), 'yticklabels')
> setp(ylabels, size=25)
> savefig("testplot.eps")
|