Repository navigation
Fix: Log Colorbar minorticks_off reverted if ticks set - #13351
Merged
NelleV merged 1 commit intoFeb 4, 2019
Merged
Conversation
Contributor
Author
|
Should I add a unit test? If so, would I adjust one I wrote a few days ago to test minorticks can be turned off for LogNorm to also add this condition (e.g. just add set_ticks after minorticks_off, prior to testing they are really off), or leave those tests alone and write a separate one (that would still do the above)? |
Member
|
@LevN0 Yes, a unit test is in order. Either adding a new one, or adding checks to an existing one is fine. |
jklymak
approved these changes
Feb 3, 2019
jklymak
left a comment
Member
There was a problem hiding this comment.
Looks right to me, subject to a test in test_colorbar.py (preferably one w/o a new image)
LevN0
force-pushed
the
fix-log-colorbar-minorticks-revert-set-ticks
branch
from
February 3, 2019 17:28
14fad1c to
6ba23b8
Compare
Contributor
Author
|
Added a test. |
jklymak
reviewed
Feb 3, 2019
| self.ax.set_xscale('log') | ||
| self.ax.set_yscale('log') | ||
|
|
||
| if type(self.norm) == colors.LogNorm: |
Member
There was a problem hiding this comment.
OK, actually we don't need the check here, do we?
Contributor
Author
There was a problem hiding this comment.
That is a very good point.
LevN0
force-pushed
the
fix-log-colorbar-minorticks-revert-set-ticks
branch
from
February 4, 2019 01:58
16d3377 to
347f65b
Compare
Fixes issue where colorbar lognorm minorticks are turned back on anytime ticks are updated
LevN0
force-pushed
the
fix-log-colorbar-minorticks-revert-set-ticks
branch
from
February 4, 2019 02:09
e8a5d91 to
ffaaabd
Compare
Member
|
This looks good! Thanks! |
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
Closes #13339.
Fixes issue where colorbar lognorm minorticks are turned back on anytime ticks are updated.
Before
Any time
ColorbarBase.update_ticksis called, it forces minorticks on for LogNorm. Calling methods likeset_tickstherefore reverts the action of minorticks_off.Produces,
(Note minorticks come back on, after being explicitly turned off.)
After
Minorticks stay off after being manually turned off.
PR Checklist