Is there a way to access ticks labels to rotate them? I've tried Graphics.matplotlib()
and set_rotation()
, but this doesn't seem to produce changes. Am I doing wrong things?
In the example below the formatter and locator are working correctly, but the problem is all labels are oriented horizontally, messing all together. Need to rotate them.
# Z is a list of [(x1,y1),(x2,y2)...]
# x1,x2 are dates
p = list_plot( Z, ticks=[10, None], tick_formatter=[dates.DateFormatter('%d.%m.%Y'), None], axes_labels=[ 'Days', '$\\log \\;{N}$' ], scale='semilogy' )
G = p.matplotlib()
labels = G.axes[0].xaxis.get_ticklabels()
labels = list(labels)
for label in labels:
label.set_rotation(45)
p
This outputs the plot with an ugly x-axis on which all the dates are messed up. How to fix that?