-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
VIS: datetime plots x axis format: labels now rotated? #8150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Originally time-series plot had a bug not to handle rotations, #7844. Now time-series uses the same default as normal line plot (30 degrees). I think whichever default is possible as long as consistent. |
OK, so you fixed the bug that rot was not applied correctly, but you also changed the default behaviour no? Because previously nothing was rotated? |
How to say...Line plot has has 30 degrees for rotation before the fix, but not applied to time-series previously. After the fix, the default is applied to time-series (as the same as |
Ah, I suppose you mean that the rotation of 30 was already in the code, only it was never actually applied? (because as you can see above, there was no rotation in 0.14, and also not in the releases before) I personally think the rotation looks a bit odd. Certainly because it is only in one of the two axes. It is also not how default matplotlib looks, and if we deviate from that we should have a good reason I think (eg like the pandas datetime formatter, which is a big improvement compared to pure matplotlib). And in practice, it is also a behavioural change compared to previous versions. |
I think it is better to stick with a default of no rotation, like matplotlib. The exception would be if you wanted to add some special logic to automatically add rotation only in cases where the tick labels would otherwise overlap. |
I think I've misunderstood the existing behavior. Previously 30 degree rotation was applied to specific datetime related cases. I'll fix it to revert the previous behavior back (default 0 degree and 30 degrees in some cases). |
@sinhrks yes I think the rotation was used when the enhanced pandas datetime formatting was not used, but the default matplotlib formatting (which often gives overlapping labels, therefore the default rotation) So you have time to address this? This should certainly be fixed before 0.15 (or @TomAugspurger if you have time) |
Yeah I can do this. |
Is this a regression, or a delibarate decision? Compare dev docs (http://pandas-docs.github.io/pandas-docs-travis/visualization.html#basic-plotting-plot) with stable ones (http://pandas.pydata.org/pandas-docs/stable/visualization.html#basic-plotting-plot).
The xaxis labels (the date/time indications) are now rotated instead of horizontal, which I personally think is not an improvement.
The text was updated successfully, but these errors were encountered: