Fixed blitting in Gtk3Agg backend as described in issue #1575.
Fixed blitting in Gtk3Agg backend to redraw only area defined by bbox (…
Looks good to me. To all involved: is it possible to test this programatically?
+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 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.
The screenshots with the patch applied are not exact identical, there are some differences in the plot line thickness.
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?
@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).