Fixed blitting in Gtk3Agg backend #1578

Merged
merged 1 commit into from Dec 10, 2012

Projects

None yet

3 participants

@spinnau
Contributor
spinnau commented Dec 9, 2012

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

@pelson
Member
pelson commented Dec 10, 2012

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

@mdboom
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 pelson merged commit 7283784 into matplotlib:v1.2.x Dec 10, 2012

1 check passed

default The Travis build passed
Details
@spinnau
Contributor
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
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
Contributor
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 unknown repository branch May 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment