rotating x tick labels, bold labels with axislines toolkit???

Hi,

I can't seem to combine the ability to rotate labels and make labels bold
when I use the axislines toolkit
(http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/axislines.html).
Is there a way to make this work?

e.g. the below script does not rotate the xtick labels or make the label
bold.

thanks,

Martin

import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid.axislines import Subplot
import numpy as np

fig = plt.figure()

ax = Subplot(fig, 111)
fig.add_subplot(ax)

ax.axis["right"].set_visible(False)
ax.axis["top"].set_visible(False)

ax.plot(np.arange(10))

xl = np.arange(10) * 2
xl = [str(i) for i in xl]

ax.set_xticks(np.arange(len(xl)))
ax.set_xticklabels(xl, rotation=30)
xlabels = ax.get_xticklabels()
for label in xlabels:
    label.set_rotation(45)

ax.set_xlabel("Test", fontweight="bold")
plt.show()

···


View this message in context: http://old.nabble.com/rotating-x-tick-labels%2C-bold-labels-with-axislines-toolkit----tp32593701p32593701.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

For those interested things are defined differently.

ax.axis["bottom"].major_ticklabels.set_pad(10)
ax.axis["bottom"].label.set_pad(15)
ax.axis["bottom"].major_ticklabels.set_rotation(30)

explained well here
(http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/axisartist.html#axisartist-manual),
i missed this!

Still haven't worked out the bold but I am sure there will be something on
that page

···


View this message in context: http://old.nabble.com/rotating-x-tick-labels%2C-bold-labels-with-axislines-toolkit----tp32593701p32593884.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Try

ax.axis["bottom"].label.set_text("Test")
ax.axis["bottom"].label.set_weight("bold")

IHTH,

-JJ

···

On Wed, Oct 5, 2011 at 11:50 AM, mdekauwe <mdekauwe@...287...> wrote:

Still haven't worked out the bold but I am sure there will be something on
that page