home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 683777199

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
683777199 MDU6SXNzdWU2ODM3NzcxOTk= 4364 plt.pcolormesh will infer interval breaks per default 10194086 open 0     3 2020-08-21T19:15:57Z 2021-03-19T14:09:52Z   MEMBER      

Looking at some warnings in #3266 I saw that matplotlib will deprecate the old behaviour of pcolormesh when the shape of the data and the coordinates are equal (they silently cut a row and a column of the data). With the new behaviour they will interpolate the coordinates.

```python import numpy as np import matplotlib.pyplot as plt

x = np.array([1, 2, 3]) y = np.array([1, 2, 3, 4, 5])

data = np.random.randn(*y.shape + x.shape)

f, axes = plt.subplots(1, 2)

for ax, shading, behavior in zip(axes, ["flat", "nearest"], ["old", "new"]): ax.pcolormesh(x, y, data, shading=shading, vmin=-0.75, vmax=0.75) ax.set_title(f"{behavior}: shading='{shading}'") ```

This is a good thing in general - we already do this for a long time with the infer_intervals keyword. Unfortunately they don't check if the data is monotonic (matplotlib/matplotlib#18317) which can lead to problems for maps (scitools/cartopy#1638). I don't think there is a need to do something right now - let's see what they think upstream.

This change was introduced in mpl 3.3.0

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4364/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.578ms · About: xarray-datasette