-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Move notify_axes_change to FigureManagerBase class. #10607
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
Conversation
... instead of duplicating it across backends. The additional cost on non-interactive backends is likely negligible.
def notify_axes_change(fig): | ||
'this will be called whenever the current axes is changed' | ||
if self.tb is not None: | ||
self.tb.update() |
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.
Won't this cause problems here because the tool bar is self.tb
and not self.toolbar
like all the other backends?
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 is already aliased to toolbar too (in fact I'm getting rid of the tb alias in a separate PR).
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.
The method needs to still be available.
self.toolbar = None | ||
|
||
@self.canvas.figure.add_axobserver | ||
def notify_axes_change(fig): |
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.
This also removes the method from all of the sub-classes.
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.
What method?
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.
🐑 never mind, I thought this was a top-level method.
... instead of duplicating it across backends. The additional cost on
non-interactive backends is likely negligible.
PR Summary
PR Checklist