| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
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)? |
Sorry, something went wrong.
|
@LevN0 Yes, a unit test is in order. Either adding a new one, or adding checks to an existing one is fine. |
Sorry, something went wrong.
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)
Sorry, something went wrong.
|
Added a test. |
Sorry, something went wrong.
| self.ax.set_xscale('log') | ||
| self.ax.set_yscale('log') | ||
|
|
||
| if type(self.norm) == colors.LogNorm: |
There was a problem hiding this comment.
OK, actually we don't need the check here, do we?
Sorry, something went wrong.
There was a problem hiding this comment.
That is a very good point.
Sorry, something went wrong.
Fixes issue where colorbar lognorm minorticks are turned back on anytime ticks are updated
|
This looks good! Thanks! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Closes #13339.
Fixes issue where colorbar lognorm minorticks are turned back on anytime ticks are updated.
Before
Any time ColorbarBase.update_ticks is called, it forces minorticks on for LogNorm. Calling methods like set_ticks therefore 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