Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Issue835 2: replacement for #835#1192
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.
Conversation
travisbot commentedSep 2, 2012
Excuse the stupid question, but I cannot see where the interactive backends are overriding the backend_base manager's Other than that, looks good to me. |
@pelson, it turned out that the GUI backend FigureManager classes already had show methods, so I didn't need to add anything. |
Looks good. I would like to get sign-off from@mdboom and@WeatherGod, but I think this is a really favourable approach. |
@@ -375,9 +375,6 @@ def notify_axes_change(fig): | |||
if self.toolbar != None: self.toolbar.update() | |||
self.canvas.figure.add_axobserver(notify_axes_change) | |||
# This is ugly, but this is what tkagg and gtk are doing. | |||
# It is needed to get ginput() working. | |||
self.canvas.figure.show = lambda *args: self.show() |
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.
Note a subtle difference between the macosx backend and most others for the show. macosx backend uses self.show() instead of self.window.show(). I am also concerned about the note saying that this is needed to make ginput() work correctly.
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.
@WeatherGod: No problem, as far as I can see. The backends that were using self.window.show also had methods self.show that were defined as self.window.show, so the difference between patching in self.window.show and self.show was zilch.
Ginput works fine on macosx after this PR.
This also adds the warn kwarg to figure.show for non-guibackends.
Rebased. |
travisbot commentedSep 4, 2012
@mdboom : Happy to merge? |
Yep. Merging now. |
As far as I can see, the monkey patching was not necessary at all, so I removed it. I think the result is much cleaner, and satisfies all requirements, to the extent that I have understood them. Testing on all backends is needed; I can do more of that tomorrow. macosx, tkagg, and qt4agg are tested. Testing on ipython notebook would be good, also.