hi all,
i am trying to make horizontal (as opposed to the default vertical)
rotated labels for axes in my subplots. i tried using the
'orientation' optional argument, as follows:
from numpy import *
from scipy import *
from mpl_toolkits.axes_grid.axislines import SubplotZero
import matplotlib.pyplot as plt
fig = plt.figure()
ax = SubplotZero(fig, 3, 1, 1)
ax1 = fig.add_subplot(ax)
ax.axis["xzero"].set_visible(True)
plt.plot([1,2,3], label="line a", c='r')
plt.plot([1.2, 2.4, 3.01], label="line b", c='b')
plt.ylabel("hello", rotation='horizontal')
ax = SubplotZero(fig, 3, 1, 2)
ax2 = fig.add_subplot(ax)
plt.plot([1,2,3], label="line a", c='r')
plt.plot([1.2, 2.4, 3.01], label="line b", c='b')
plt.ylabel("world")
ax = SubplotZero(fig, 3, 1, 3)
ax3 = fig.add_subplot(ax)
plt.plot([1,2,3], label="line a", c='r')
plt.plot([1.2, 2.01, 3.01], label="line b", c='b')
plt.figlegend([ax1.lines[0], ax1.lines[1]], ["line a", "line b"], 'upper right')
but it does not work. both the labels "hello" and "world" of the y
axes are displayed in their default vertical orientation. the argument
seems to have no effect. i am using matplotlib '0.99.0' on Mac OS X.
any ideas how to fix this?
thanks.