[Tutor] matplotlib pylab question - offset bar graph labels
Sean Carolan
scarolan at gmail.com
Wed Jun 13 21:44:54 CEST 2012
> I've got a function that builds a bar graph. We are 95% happy with
> it, but the x-axis tick labels are a little bit skewed to the right.
> Anyone know how to skew the labels over by 10 or 20 pixels? Here's
> the code that generates my xticks:
>
> xticks(range(len(builds)), users, rotation=30)
In case anyone else comes across this issue, I found an acceptable
solution, these settings seem to work well for us:
xticks(range(len(xnames)), xnames, rotation=45, size=8,
horizontalalignment='center')
More information about the Tutor
mailing list