-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
logitlocator misses tick at edge of axis #14743
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
This issue seems to be more complicated. When I try to explicitly set the axis limits, axis limits revert to the default (i.e. the opposite of what I want). This is independent of whether I run a plot command afterward. Also the default range is too large and default number of ticks is too high. import matplotlib.pyplot as plt
import numpy as np
f, ax = plt.subplots()
N = 50
ax.set_yscale('logit')
# ax.set_ylim((0.1,0.9))
ax.plot(np.linspace(0,1,N), np.linspace(0.1,0.9,N)) import matplotlib.pyplot as plt
import numpy as np
f, ax = plt.subplots()
N = 50
ax.set_yscale('logit')
ax.set_ylim((0.1,0.9))
ax.plot(np.linspace(0,1,N), np.linspace(0.1,0.9,N)) |
So at least the number of ticks issue is solved (cf. #14512). |
The original issue was fixed in #14928, but there's a small followup: when doing |
Is anyone else currently working on this? If not I'll give it a try. |
Go for it. |
RiazCharania and I will not be working on this issue. |
I think that's what I said: a tick is missing at the top (1-1e-3). |
Bug report
Bug summary
When no data is plotted, a logit scale ignores calls to set_{x/y}lim and sticks to the default(?) of [1e-7, 1-1e-7]
edit: fixed, but see follow up at #14743 (comment).
Code for reproduction
Actual outcome
This image is made with the formatter provided by #14512 for legibility (the formatter before that PR is impossible to read), but that doesn't change the axes limits.
Expected outcome
limits respecting the set ylims.
Note that adding a call to e.g.
plot(<any values>)
(within or without the given limits) fixes the issue.Matplotlib version
print(matplotlib.get_backend())
): anyThe text was updated successfully, but these errors were encountered: