You can use 'LABELPAD' to adjust label position.
e.g.
import pylab
hAxes = pylab.axes()
pylab.xlabel('test')
hAxes.xaxis.LABELPAD = 0
pylab.show()
--
Yong-Duk Jin
On Tuesday 28 April 2009 14:08:50 Thomas Robitaille wrote:
> Hi,
>
> This is probably a simple question, but what is the best way to
> control the vertical positioning of the x-axis label? I tried:
>
> import matplotlib
> matplotlib.use('Agg')
> import matplotlib.pyplot as mpl
>
> fig = mpl.figure()
> ax = fig.add_subplot(111)
> ax.set_xlabel("Hello",position=(0.5,-0.2))
> fig.savefig('test.png')
>
> But this doesn't work. Strangely, changing the first position element
> does shift the label left and right, but changing the second does not
> move the label vertically.
>
> I'm using matplotlib 0.98.5.2
>
> Thanks for any advice!
>
> Thomas
>
>
> ---------------------------------------------------------------------------
>--- Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users