-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: LogFormatter minor ticks with minor_thresholds of (0,0) misbehaves #26277
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
base: main
Are you sure you want to change the base?
Conversation
(Deleted my comment since I realized that it can be both an empty set and None.) Seems like this breaks several other things. |
3f120f7
to
13b8af4
Compare
13b8af4
to
e06b857
Compare
I'm not sure which fix is better, or if there is any other superior solution available. Based on the commit history, there are two potential fixes:
Note that it assumes
What about "abnormally"? Can a major formatter have 'labelOnlyBase' set to
When import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
fig, ax = plt.subplots()
ax.set_yscale("log")
formatter = mticker.LogFormatter(minor_thresholds=(0,0))
ax.yaxis.set_minor_formatter(formatter)
ax.set_ylim(10, 20)
formatter(10) # '10'
formatter(11) # ''
formatter(12) # ''
formatter(13) # ''
formatter(14) # ''
formatter(15) # ''
formatter(16) # '' Furthermore, what does the term "classic" style refer to in the documentation? Maybe we could provide a more precise description. |
Classic is the pre-2.0 default style. |
fix test failures alternative fix fix format remove irrelevant code remove label_expected
29b913a
to
6e9179d
Compare
Hi @oscargus, could you review the PR again? |
PR summary
PR checklist
minor_thresholds
of (0,0) does not behave as documented #25896" is in the body of the PR description to link the related issue