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
Upgrade tests to use matplotlib v1.4/v1.5 #354
Comments
Travis seems to be using 1.3.1, so I guess this is fixed? |
Seems reasonable. Maybe we should re-use the issue to upgrade to v1.4 (or v1.5 when it arrives) |
@pelson Do you know if figure autoscaling was changed in matplotlib 1.4? It's the only thing that's causing a really big difference in results. For example, AssertionError:
Arrays are not almost equal to 6 decimals
(mismatch 100.0%)
x: array([[ 86.125047, 52.516846],
[ 86.69595 , 52.862473]])
y: array([[ 86.124337, 52.515705],
[ 86.696966, 52.863721]]) |
These images require a small change to the baseline due to minor differences in the corners of the axes lines (~0.1-0.3 RMS):
These tests show larger issues:
|
I think many of these are intended changes and/or bugfixes, so I'm inclined to simply replace the baseline images. The first streamplot change might be a bug, but it's been so long, I don't know if it should be changed now. matplotlib/matplotlib@b8726d0 is a bit strange, but the test image was specifically changed, so I guess it's intended. I'm not totally sure about matplotlib/matplotlib@f511ef9 though. |
There's one more change causing failures with 1.4.3:
I think this one might be a bug. The left edge is cropped a little bit, and it's pretty evident from the Interrupted Goode Homolosine image. |
With 1.5.x, there are some more images with small changes (RMS < 1):
All are caused by matplotlib/matplotlib@2a17839 (upgrade of Agg) and since the changes are nearly invisible, I think simply replacing them is the way to go. There are a few more larger changes to bisect... |
It turns out almost all the images need to regenerated due to the above mentioned upgrade of Agg in the upcoming matplotlib 1.5.0. There are a couple other major differences:
I think both of the above are intended changes. |
You can see the resulting images in this branch. There is still something weird going on because |
@pelson Let me know if we should file any bugs in matplotlib; not sure we'll be able to get them into 1.5.0, at this point. |
This is awesome work @QuLogic - super thorough, and really useful, thank you!
Yes we should. Whether they are fixed in 1.5 or a subsequent release is not as important as ensuring we report them. Next steps: I think we should consider our image testing strategy within cartopy - the many minor differences in agg rendering show that we are way to sensitive to minor rendering changes, yet some of the other tests show that we are way too insensitive to some other key changes. Obviously we are not going to solve that problem here and now, but it is worth mentioning and starting to think about. As for next steps, I think it would be healthy to be able to run the cartopy's matplotlib tests against multiple matplotlib versions for a few releases before we drop support for v1.3. Doing so means we need to define a results structure which allows us to have multiple image result directories (based on the matplotlib version). Would you mind taking a look at that? The next concern is the fact that the cartopy repository is only getting bigger due to these image changed. Already I find it frustrating to do a clean checkout of the cartopy repo due to the time to download, for some reason my git seems to throttle after a number of Mb. One option then would be to pull all of the image tests out of the core repository, and to put them into their own repo which we link to in here (perhaps using git submodules). What are your thoughts on doing that? |
I opened a report for matplotlib/matplotlib@5ab1a68 (matplotlib/matplotlib#5369) and matplotlib/matplotlib@44ff97e (matplotlib/matplotlib#5370.) I believe matplotlib/matplotlib@e586c09, matplotlib/matplotlib@e8f035d, matplotlib/matplotlib@2a17839, matplotlib/matplotlib@37927b2, and matplotlib/matplotlib@c6d0183 are intended changes. I am not sure about matplotlib/matplotlib@f511ef9 and matplotlib/matplotlib@b8726d0. |
I've been digging on this, and while the result is different, I think the problem is related to the new need to do a relim and autoscale_view as per #647 (comment). Some investigation of why this has come about is needed - it may be that the draw pipeline has changed subtly, and we need to account for that in the |
So what's the minimum matplotlib version to support? |
Somewhat arbitrarily v1.3. One of my own motivations for that is my employers stack is still on that version currently. |
Patched QuadMesh to compute the datalimits of the boundary, not the bounding box (see #354).
OK, I figured out this one; they both produce a different image from the stored one, but the other test that uses the same result overwrites it with the correct one. A bit of a peril of re-using the same result image name. |
I think maybe |
Also, the new-ish |
Should be done now. |
Deprecate v1.2.0 support after v0.10.
The text was updated successfully, but these errors were encountered: