-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: allow secondary axes minor locators to be set #14447
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
FIX: allow secondary axes minor locators to be set #14447
Conversation
@@ -272,6 +273,11 @@ def _set_scale(self): | |||
if self._orientation == 'y': | |||
pscale = self._parent.yaxis.get_scale() | |||
set_scale = self.set_yscale | |||
if pscale == self._parentscale: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want ==
or is
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ==, get_scale returns a string. Well really we should retrieve the scale object rather than a scale string, but that's a separate issue...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment, but otherwise 👍
Merging as 3.2, but @jklymak can backport to 3.1 if he wants :) |
PR Summary
We set the scale for
secondary_axis
for each draw in case the parent scale has changed (i.e. from linear to log), but this means that we can't set the locators and formatters for the secondary axis. This change keeps track of the parent scale and only resets the locators and formatters if the parent scale changes.Closes #14443
now works as expected...
PR Checklist