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

suspected mpl 3.4.1 regression for a graphical test #4090

Closed
bjlittle opened this issue Apr 9, 2021 · 4 comments · Fixed by #4999
Closed

suspected mpl 3.4.1 regression for a graphical test #4090

bjlittle opened this issue Apr 9, 2021 · 4 comments · Fixed by #4999

Comments

@bjlittle
Copy link
Member

bjlittle commented Apr 9, 2021

🐛 Bug Report

How To Reproduce

As part of #4087, the perceptual image hash images have been updated to account for the associated changes within iris from the recent release of matplotlib 3.4.1.

As part of #4087, SciTools/test-iris-imagehash#39 was raised to update the test-iris-imagehash archive.

Consequently, there appears to be a regression for one the graphical test iris.tests.test_mapping.TestLimitedAreaCube.test_grid.0, see here for further details.

Steps to reproduce the behaviour:

From the root directory of iris:

  1. git checkout 7fd7960e25cefc48c49a6e518cfd02f42fa860ea
  2. pip install --no-deps --editable .
  3. python setup.py test
  4. python lib/iris/tests/idiff.py --results iris_image_test_output

Environment

  • Iris Version: as per the iris commit SHA
  • Matplotlib Version: 3.4.1

Additional context

Click to expand this section...
Add additional verbose information in a collapsible section.

See here for further details.

@bjlittle
Copy link
Member Author

bjlittle commented Apr 9, 2021

@SciTools/peloton An ideal issues for the peloton to chase down 👍

@rcomer
Copy link
Member

rcomer commented May 11, 2021

The comment on that test suggests that the grid is supposed to be blue and the colours were caused by a matplotlib bug. 😕

def test_grid(self):
iplt.pcolormesh(self.cube, facecolors="none", edgecolors="blue")
# the result is a graphic which has coloured edges. This is a mpl bug,
# see https://github.com/matplotlib/matplotlib/issues/1302

@rcomer
Copy link
Member

rcomer commented May 12, 2021

Maybe the fact that this test result has changed is telling us we can now remove the extra handling in iris.plot.outline 🤔

iris/lib/iris/plot.py

Lines 1276 to 1280 in 83309c3

# set the _is_stroked property to get a single color grid.
# See https://github.com/matplotlib/matplotlib/issues/1302
result._is_stroked = False
if hasattr(result, "_wrapped_collection_fix"):
result._wrapped_collection_fix._is_stroked = False

@rcomer
Copy link
Member

rcomer commented May 28, 2021

History: #109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants