-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Log scale tick labels are overlapping #6549
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
Can you try the 2.0.0b1 which implements something like that? |
2.0 solves the problem for linear scale, but not for log-scale (the original issue): the |
@tacaswell : The only difference in 2.0b is that the default label font size is smaller (or maybe it just uses a different backend), resulting in the above linear scale example to actually work. But adding some 0s, I can still reproduce the problem even with linear scales, unlike @anntzer said. logarithmic scale (minimal example from 1st post): Above done with:
|
Indeed, 2.0 just uses a heuristic where the aspect ratio of an xlabel is no more than 1x3 (by the way, I just realized that this would be way too pessimistic (too optimistic for ylabels) if the labels are rotated...). As discussed in #5494, it is not so easy to handle this automatically because the tick labels are rendered after the tick positions are selected. |
Linked with #7001 |
Linux hypatia-pc 4.5.0-1-amd64 Fix autofmt_xdate() when using in conjunction with twinx() #1 SMP Debian 4.5.1-1 (2016-04-14) x86_64 GNU/Linux
matplotlib 1.5.2~rc2-1
Python 2.7.11+
installed using:
sudo apt-get install -t sid python matplotlibg
Here is an example where the problem appears:
For lack of time the following image wasn't reproduced with the above example, but came from another problem:

The right side shows the problem and the left side is my workaround which calculates some distance for a given amount of labels I want (here I wanted 5 labels or less). So it set every exponent, but every sixth integer exponent, i.e. -16,-10,-4.
It would be cool if it was fully automatic like with linear scales.
The text was updated successfully, but these errors were encountered: