Fixed blitting in Gtk3Agg backend #1578

merged 1 commit into from Dec 10, 2012


None yet

3 participants

spinnau commented Dec 9, 2012

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

pelson commented Dec 10, 2012

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

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
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 ( 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.


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


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 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 with a small tolerance value instead of PIL for comparing the images (

@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