I am trying to rotate the xticks labels in a pandas bar plot.
My problem is that when I do so, the xticks labels are centered according to their middle, and I would like to center the otherwise (so that their top extremity is centered with the corresponding bar).
Any idea how to do that?
Here is an example, first without the rotation:
foo = pd.Series({'A first label':4,'A very long yet absolutely necessary label':10,'A short label':12,
'Another label':6,"Getting long":3,"You weren't supposed to read this'":7,
"42 obviously":8,"Blank page syndrom":2})
foo.plot(kind = 'bar')
And then when I add the rotation, the long labels don't behave the way I'd want:
See for instance the A very long yet absolutely necessary label
which is almost above the Another label
on its right.
I would like the end of each label to be centered with the bar above it, how can I do this?