Skip to content
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

Issue835 2: replacement for #835 #1192

Merged
merged 2 commits into from Sep 5, 2012
Merged

Conversation

efiring
Copy link
Member

@efiring efiring commented Sep 2, 2012

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.

@travisbot
Copy link

This pull request fails (merged b76166f1 into 92721ed).

@pelson
Copy link
Member

pelson commented Sep 2, 2012

Excuse the stupid question, but I cannot see where the interactive backends are overriding the backend_base manager's show method. I must be missing something very obvious...

Other than that, looks good to me.

@efiring
Copy link
Member Author

efiring commented Sep 2, 2012

@pelson, it turned out that the GUI backend FigureManager classes already had show methods, so I didn't need to add anything.

@pelson
Copy link
Member

pelson commented Sep 2, 2012

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()
Copy link
Member

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.

Copy link
Member Author

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.

@efiring
Copy link
Member Author

efiring commented Sep 4, 2012

Rebased.

@travisbot
Copy link

This pull request fails (merged 51ffd4b into 0f9f85f).

@pelson
Copy link
Member

pelson commented Sep 5, 2012

@mdboom : Happy to merge?

@mdboom
Copy link
Member

mdboom commented Sep 5, 2012

Yep. Merging now.

mdboom added a commit that referenced this pull request Sep 5, 2012
@mdboom mdboom merged commit 15fd0ae into matplotlib:master Sep 5, 2012
@efiring efiring deleted the issue835_2 branch May 29, 2013 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants