MetOffice / MetOffice/CSET

Matplotlib 3.11.0 causes pcolormesh spatial plots to not show anything

Open
#2,205 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
33
Forks
19
Avg merge
1d 22h
Merged PRs (30d)
30

Description

### Describe the bug

## matplotlib 3.10.9

Image

Plot looks normal.

## matplotlib 3.11.0

Image

No spatial plot is shown, just the colourbar.

### How to reproduce

Steps to reproduce the behaviour:

0. Create a cset conda environment with matplotlib 3.11.0
1. `pytest -vvk test_spatial_pcolormesh_plot tests/operators/test_plot.py`
2. `display "$TMPDIR/pytest-of-$USER/pytest-current/test_spatial_pcolormesh_plotcurrent/plot.png"`
3. Observe breakage.

### Expected behaviour

Matplotlib 3.11 isn't meant to be a breaking change, so our plots should continue to work.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running `pytest -vvk test_spatial_pcolormesh_plot tests/operators/test_plot.py` and inspect the spatial plotting code exercised by `test_spatial_pcolormesh_plot`. Compare the generated plot with Matplotlib 3.10.9 and 3.11.0 to identify the compatibility break. Done means the spatial plot renders again, including its data, and the targeted test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.