home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 393742068

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
393742068 MDU6SXNzdWUzOTM3NDIwNjg= 2628 Empty plot with pcolormesh in the notebook 4711805 closed 0     3 2018-12-23T11:21:48Z 2020-12-05T05:06:36Z 2020-12-05T05:06:36Z CONTRIBUTOR      

Code Sample

```python import numpy as np import xarray as xr import matplotlib.pyplot as plt %matplotlib inline

a = np.ones((4000, 4000), dtype=np.uint8) a[:1000, :1000] = 0 lat = np.array([0-i for i in range(a.shape[0])]) lon = np.array([0+i for i in range(a.shape[1])]) da = xr.DataArray(a, coords=[lat, lon], dims=['lat', 'lon'])

da.plot.pcolormesh() ```

Problem description

The code above shows an empty plot in a notebook (but not in the console).

Expected Output

If I replace da.plot.pcolormesh() with da.plot.imshow() or plt.pcolormesh(a), it works fine. Also, if I decrease the size of the array, it works.

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.6.6.final.0 python-bits: 64 OS: Linux OS-release: 4.10.0-42-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 xarray: 0.10.7 pandas: 0.23.4 numpy: 1.15.4 scipy: 1.1.0 netCDF4: 1.4.1 h5netcdf: 0.6.2 h5py: 2.8.0 Nio: 1.5.4 zarr: 2.2.0 bottleneck: 1.2.1 cyordereddict: None dask: 0.20.2 distributed: 1.24.2 matplotlib: 3.0.2 cartopy: None seaborn: None setuptools: 40.6.2 pip: 18.1 conda: 4.5.12 pytest: None IPython: 7.1.1 sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2628/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

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