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

Fixed blitting in Gtk3Agg backend #1578

Merged
merged 1 commit into from Dec 10, 2012
Merged

Fixed blitting in Gtk3Agg backend #1578

merged 1 commit into from Dec 10, 2012

Conversation

spinnau
Copy link
Contributor

@spinnau spinnau commented Dec 9, 2012

Fixed blitting in Gtk3Agg backend as described in issue #1575.

@pelson
Copy link
Member

pelson commented Dec 10, 2012

Looks good to me. To all involved: is it possible to test this programatically?

@mdboom
Copy link
Member

mdboom commented Dec 10, 2012

+1. I'm not sure how to test this, unfortunately, given that involves opening windows etc. I'd be happy to see this merged in any case.

pelson added a commit that referenced this pull request Dec 10, 2012
Fixed blitting in Gtk3Agg backend
@pelson pelson merged commit 7283784 into matplotlib:v1.2.x Dec 10, 2012
@spinnau
Copy link
Contributor Author

spinnau commented Dec 10, 2012

@pelson For testing you have to compare screenshots of opened windows. Thus, on linux machines a running XServer is needed. I don't know if it's the case on the build servers.

I have created a proposal for a test (https://gist.github.com/4254321). It compares two screenshots for normal plot and for blitting. Screenshots are taken with imagemagick. This works independent of the backend, so with a change of the GObject.idle_add line the test can be used for all blitting enabled backends. The imagemagick import command line tool doesn't work under Windows operating systems. Here PIL.ImageGrab could be used instead.

The images shows the screenshots for normal plot (left) and with blitting (right). Without the patch it can be seen, that the figure background and axes labels are missed.

test_without_patch

The screenshots with the patch applied are not exact identical, there are some differences in the plot line thickness.

test_with_patch

@mdboom
Copy link
Member

mdboom commented Dec 11, 2012

It still likes it might be difficult to throw that test in our automated tests (which have to run without X etc), but maybe we should throw this in unit with some of our other off-line tests?

@spinnau
Copy link
Contributor Author

spinnau commented Dec 11, 2012

@mdboom If the automated tests have to run without XServer then using it as an off-line test seems to be the only possible solution. I have slightly enhanced the code for the test, so it now uses matplotlib.testing.compare with a small tolerance value instead of PIL for comparing the images (https://gist.github.com/4254321).

@spinnau spinnau deleted the fix_1575 branch May 29, 2013 21:22
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

3 participants