Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Attach a FigureCanvasBase by default to Figures.#12450
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -652,8 +652,7 @@ def set_xlim3d(self, left=None, right=None, emit=True, auto=False, | ||
if other is not self: | ||
other.set_xlim(self.xy_viewLim.intervalx, | ||
emit=False, auto=auto) | ||
if other.figure != self.figure: | ||
other.figure.canvas.draw_idle() | ||
self.stale = True | ||
return left, right | ||
@@ -711,8 +710,7 @@ def set_ylim3d(self, bottom=None, top=None, emit=True, auto=False, | ||
if other is not self: | ||
other.set_ylim(self.xy_viewLim.intervaly, | ||
emit=False, auto=auto) | ||
if other.figure != self.figure: | ||
other.figure.canvas.draw_idle() | ||
self.stale = True | ||
return bottom, top | ||
@@ -770,8 +768,7 @@ def set_zlim3d(self, bottom=None, top=None, emit=True, auto=False, | ||
if other is not self: | ||
other.set_zlim(self.zz_viewLim.intervalx, | ||
emit=False, auto=auto) | ||
if other.figure != self.figure: | ||
other.figure.canvas.draw_idle() | ||
self.stale = True | ||
return bottom, top | ||
@@ -1070,17 +1067,14 @@ def mouse_init(self, rotate_btn=1, zoom_btn=3): | ||
""" | ||
self.button_pressed = None | ||
self._cids = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Concerned that if we are hitting this code path with the base canvas and then it gets replaced the subscriptions will not work. On the other hand, you are no worse than you are now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. So I'll leave it as it is until someone complains :) | ||
self.figure.canvas.mpl_connect( | ||
'motion_notify_event', self._on_move), | ||
self.figure.canvas.mpl_connect( | ||
'button_press_event', self._button_press), | ||
self.figure.canvas.mpl_connect( | ||
'button_release_event', self._button_release), | ||
] | ||
# coerce scalars into array-like, then convert into | ||
# a regular list to avoid comparisons against None | ||
# which breaks in recent versions of numpy. | ||