Fix xtick.minor.visible only acting on the xaxis#12938
Merged
timhoffm merged 1 commit intomatplotlib:masterfrom Dec 10, 2018
Merged
Fix xtick.minor.visible only acting on the xaxis#12938timhoffm merged 1 commit intomatplotlib:masterfrom
timhoffm merged 1 commit intomatplotlib:masterfrom
Conversation
timhoffm
reviewed
Dec 6, 2018
lib/matplotlib/scale.py
Outdated
| # update the minor locator for x and y axis based on rcParams | ||
| if rcParams['xtick.minor.visible']: | ||
| if axis.axis_name in list("xy") and \ | ||
| rcParams['{}tick.minor.visible'.format(axis.axis_name)]: |
Member
There was a problem hiding this comment.
IMHO this would be slightly more readable:
if (axis.axis_name == 'x' and rcParams['xtick.minor.visible']
or axis.axis_name == 'y' and rcParams['ytick.minor.visible']):
tacaswell
approved these changes
Dec 9, 2018
Member
tacaswell
left a comment
There was a problem hiding this comment.
Modulo adding a test.
Don't think we need an image test, just ask the axis if the minor ticks are turned on.
fa4f868 to
ef22343
Compare
ef22343 to
b6fd4e5
Compare
Member
Author
|
Test added. |
timhoffm
approved these changes
Dec 10, 2018
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Dec 10, 2018
QuLogic
added a commit
that referenced
this pull request
Dec 10, 2018
…938-on-v3.0.x Backport PR #12938 on branch v3.0.x (Fix xtick.minor.visible only acting on the xaxis)
Merged
6 tasks
Stephen-Chilcote
pushed a commit
to Stephen-Chilcote/matplotlib
that referenced
this pull request
Dec 11, 2018
raamana
added a commit
to raamana/matplotlib
that referenced
this pull request
Dec 13, 2018
* upstream/master: (1723 commits) Correctly get weight & style hints from certain newer Microsoft fonts (matplotlib#12945) Remove some checks for Py<3.6 in the test suite. (matplotlib#12974) Fail-fast when trying to run tests with too-old pytest. Include scatter plots in Qt figure options editor. (matplotlib#12779) ENH: replace deprecated numpy header Minor simplifications. tickminorvisible-fix (matplotlib#12938) Remove animated=True from animation docs Update the documentation of Cursor Misc. cleanups. Add test for 3d conversion of empty PolyCollection Support ~ as nonbreaking space in mathtext. Deprecate public use of Formatter.pprint_val. MAINT: Unify calculation of normal vectors from polygons (matplotlib#12136) Fix the title of testing_api More table documentation Simplify bachelors degree example using new features. Avoid pyplot in showcase examples. Simplify argument checking in Table.__getitem__. (matplotlib#12932) Minor updates following bump to Py3.6+. ... # Conflicts: # lib/matplotlib/widgets.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
#10193 introduced a bug, that when the rc param
xtick.minor.visibleis set toTrue, also the y-axis would get minor ticks.This PR fixes this.
with this PR
Interestingly though,
plt.rcParams["ytick.minor.visible"] = Truealways worked fine. So in that sense I'm not sure if theScalewould even need to set the locator the way it does.PR Checklist