home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

2 rows where state = "closed" and user = 9312831 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date), closed_at (date)

type 1

  • issue 2

state 1

  • closed · 2 ✖

repo 1

  • xarray 2
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
1176172498 I_kwDOAMm_X85GGvfS 6399 DataArray.plot.pcolormesh with kwarg shading='gouraud' miniufo 9312831 closed 0     4 2022-03-22T02:09:36Z 2022-03-22T10:14:18Z 2022-03-22T10:14:18Z NONE      

What happened?

Given a DataArray da, I try to plot with python da.plot.pcolormesh(shading='flat') and it works well. But if I change shading to 'gouraud', it reports ``` python C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes_axes.py in _pcolorargs(self, funcname, shading, args, *kwargs) 5709 else: # ['nearest', 'gouraud']: 5710 if (Nx, Ny) != (ncols, nrows): -> 5711 raise TypeError('Dimensions of C %s are incompatible with' 5712 ' X (%d) and/or Y (%d); see help(%s)' % ( 5713 C.shape, Nx, Ny, funcname))

TypeError: Dimensions of C (256, 512) are incompatible with X (513) and/or Y (257); see help(pcolormesh) ```

Not sure if this relates to xarray or matplotlib.

What did you expect to happen?

python da.plot.pcolormesh(shading='gouraud') should works well as python da.plot.pcolormesh(shading='flat')

Minimal Complete Verifiable Example

```Python import xarray as xr

ds = xr.tutorial.open_dataset('air_temperature') ds.air[0].plot.pcolormesh(shading='gouraud') ```

Relevant log output

```Python C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes_axes.py in _pcolorargs(self, funcname, shading, args, *kwargs) 5709 else: # ['nearest', 'gouraud']: 5710 if (Nx, Ny) != (ncols, nrows): -> 5711 raise TypeError('Dimensions of C %s are incompatible with' 5712 ' X (%d) and/or Y (%d); see help(%s)' % ( 5713 C.shape, Nx, Ny, funcname))

TypeError: Dimensions of C (25, 53) are incompatible with X (54) and/or Y (26); see help(pcolormesh) ```

Anything else we need to know?

No

Environment

INSTALLED VERSIONS

commit: None python: 3.8.11 (default, Aug 6 2021, 09:57:55) [MSC v.1916 64 bit (AMD64)] python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: ('Chinese (Simplified)_China', '936') libhdf5: 1.12.1 libnetcdf: 4.8.1

xarray: 0.19.0 pandas: 1.3.1 numpy: 1.20.3 scipy: 1.6.2 netCDF4: 1.5.8 pydap: installed h5netcdf: 0.12.0 h5py: 3.4.0 Nio: None zarr: 2.8.1 cftime: 1.6.0 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: 0.9.9.1 iris: None bottleneck: 1.3.2 dask: 2021.08.0 distributed: 2021.08.0 matplotlib: 3.4.2 cartopy: 0.18.0 seaborn: 0.11.2 numbagg: None pint: None setuptools: 52.0.0.post20210125 pip: 21.0.1 conda: 4.11.0 pytest: 6.2.4 IPython: 7.26.0 sphinx: 4.0.2

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6399/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
588126763 MDU6SXNzdWU1ODgxMjY3NjM= 3896 consecutive time selection miniufo 9312831 closed 0     7 2020-03-26T03:24:12Z 2020-03-28T14:39:06Z 2020-03-28T14:39:06Z NONE      

Not sure if this has been asked.

I have a sea surface temperature (SST) DataArray (monthly data) and want to use it to define El Nino. An El Nino event is defined by a five consecutive 3-month running mean of SST anomalies in the Niño 3.4 region that is above the threshold of 0.5°C. I know I can use roll object to get the 3-month running mean. But how to meet the requirement of five-consecutive months? Is there a simple way to do this using xarray's API?

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

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 1528.907ms · About: xarray-datasette