home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

3 rows where user = 11541317 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 2

  • issue 2
  • pull 1

state 1

  • closed 3

repo 1

  • xarray 3
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
894753913 MDExOlB1bGxSZXF1ZXN0NjQ3MDcwNjc0 5334 Properly infer intervals of pcolormesh when plotting on logscale santisoler 11541317 closed 0     6 2021-05-18T20:28:02Z 2021-07-02T17:09:05Z 2021-07-02T12:42:35Z CONTRIBUTOR   0 pydata/xarray/pulls/5334

When inferring the interval breaks, the coord and first linearized if scale="log" and then the intervals are brought back to the original scale before being returned to pcolormesh. Raise an error if at least one of the elements of the coodinates has a non-positive element when using a logscale.

  • [x] Closes #5333
  • [x] Tests added
  • [x] Passes pre-commit run --all-files
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [x] New functions/methods are listed in api.rst
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5334/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
894669073 MDU6SXNzdWU4OTQ2NjkwNzM= 5333 Unexpected behaviour of pcolormesh with logscale in x or y axes santisoler 11541317 closed 0     1 2021-05-18T18:39:12Z 2021-07-02T12:42:35Z 2021-07-02T12:42:35Z CONTRIBUTOR      

What happened:

When using xarray.DataArray.plot.pcolormesh with yscale="log" the output figure distorts the y axis and thus doesn't plot the data correctly. I think the problem is related to the inference of the intervals through the xarray.plot.utils._infer_intervals_breaks() function.

What you expected to happen:

I expect the yscale="log" argument to correctly display the y axis in a logscale while precisley plotting the data. In my opinion, the inference of the intervals for the pcolormesh should be also done in log scales.

Minimal Complete Verifiable Example:

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

x = np.linspace(-3, 4, 15) y = np.logspace(-4, 3, 8)

xx, yy = np.meshgrid(x, y) z = np.exp(-(xx ** 2) - np.log10(yy) ** 2) - np.exp( -((xx - 1) ** 2) - (np.log10(yy) - 1) ** 2 )

da = xr.DataArray( z, coords={"x": x, "y": y}, dims=("y", "x"), )

da.plot(yscale="log") plt.show()

```

Output:

Anything else we need to know?:

I pass infer_intervals=False I get a plot that looks more to the expected one:

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

x = np.linspace(-3, 4, 15) y = np.logspace(-4, 3, 8)

xx, yy = np.meshgrid(x, y) z = np.exp(-(xx ** 2) - np.log10(yy) ** 2) - np.exp( -((xx - 1) ** 2) - (np.log10(yy) - 1) ** 2 )

da = xr.DataArray( z, coords={"x": x, "y": y}, dims=("y", "x"), )

da.plot(yscale="log", infer_intervals=False) plt.show()

```

The problem with deactivating the infer_intervals is that matplotlib crops the last row and column of the 2d grid, because we would be selectingshading="flat", getting the following deprecation warning from matplotlib: /home/santi/git/xarray/xarray/plot/plot.py:1033: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3. Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading']. This will become an error two minor releases later. primitive = ax.pcolormesh(x, y, z, **kwargs)

That's why I think that the inference of the breaks should also be done in log scales.

Environment:

Output of <tt>xr.show_versions()</tt> INSTALLED VERSIONS ------------------ commit: 49aa235fc63706dc145128dd13fdf139b9d5bc6e python: 3.9.4 | packaged by conda-forge | (default, May 10 2021, 22:13:33) [GCC 9.3.0] python-bits: 64 OS: Linux OS-release: 5.12.1-2-MANJARO machine: x86_64 processor: byteorder: little LC_ALL: None LANG: en_US.utf8 LOCALE: ('en_US', 'UTF-8') libhdf5: 1.10.6 libnetcdf: 4.7.4 xarray: 0.18.1.dev33+g49aa235f pandas: 1.2.4 numpy: 1.20.1 scipy: 1.6.3 netCDF4: 1.5.6 pydap: installed h5netcdf: 0.11.0 h5py: 3.2.1 Nio: None zarr: 2.8.1 cftime: 1.4.1 nc_time_axis: 1.2.0 PseudoNetCDF: installed rasterio: 1.2.3 cfgrib: 0.9.9.0 iris: 2.4.0 bottleneck: 1.3.2 dask: 2021.05.0 distributed: 2021.05.0 matplotlib: 3.4.2 cartopy: 0.19.0.post1 seaborn: 0.11.1 numbagg: installed pint: 0.17 setuptools: 49.6.0.post20210108 pip: 21.1.1 conda: None pytest: 6.2.4 IPython: None sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5333/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
482335669 MDU6SXNzdWU0ODIzMzU2Njk= 3230 Import error when calling open_rasterio santisoler 11541317 closed 0     2 2019-08-19T14:10:57Z 2019-08-20T12:54:34Z 2019-08-20T12:54:34Z CONTRIBUTOR      

Problem Description

When using xarray.open_rasterio for loading the Bedmap2 dataset from geoTIFF files we are getting an ImportError after xarray tries to import gdal_version from rasterio._base. The error is raised after uploading rasterio to 1.0.25. When using rasterio 1.0.24, the problem does not exist.

This error was caught by @ChetGoerzen and originally reported on https://github.com/fatiando/rockhound/issues/53.

python import xarray as xr xr.open_rasterio("bedmap2_bed.tif") python-traceback Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/santi/.miniconda3/envs/rockhound/lib/python3.7/site-packages/xarray/backends/rasterio_.py", line 214, in open_rasterio import rasterio File "/home/santi/.miniconda3/envs/rockhound/lib/python3.7/site-packages/rasterio/__init__.py", line 22, in <module> from rasterio._base import gdal_version ImportError: libtiledb.so.1.6.0: cannot open shared object file: No such file or directory

Expected Output

python-traceback <xarray.DataArray (band: 1, y: 6667, x: 6667)> [44448889 values with dtype=int16] Coordinates: * band (band) int64 1 * y (y) float64 3.333e+06 3.332e+06 3.331e+06 ... -3.332e+06 -3.333e+06 * x (x) float64 -3.333e+06 -3.332e+06 ... 3.332e+06 3.333e+06 Attributes: transform: (1000.0, 0.0, -3333500.0, 0.0, -1000.0, 3333500.0) crs: +init=epsg:3031 res: (1000.0, 1000.0) is_tiled: 1 nodatavals: (32767.0,) scales: (1.0,) offsets: (0.0,)

Output of xr.show_versions()

``` INSTALLED VERSIONS ------------------ commit: None python: 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 21:52:21) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 4.19.66-1-MANJARO machine: x86_64 processor: byteorder: little LC_ALL: None LANG: es_AR.utf8 LOCALE: es_AR.UTF-8 libhdf5: None libnetcdf: None xarray: 0.12.3 pandas: 0.25.0 numpy: 1.17.0 scipy: 1.3.1 netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2.3.0 distributed: 2.3.0 matplotlib: 3.1.1 cartopy: 0.17.0 seaborn: None numbagg: None setuptools: 41.0.1 pip: 19.2.2 conda: None pytest: 5.1.0 IPython: None sphinx: 1.8.5 ```

Output of conda list

``` # packages in environment at /home/santi/.miniconda3/envs/rockhound: # # Name Version Build Channel _libgcc_mutex 0.1 main affine 2.2.2 py_0 conda-forge alabaster 0.7.12 py_0 conda-forge appdirs 1.4.3 py_1 conda-forge asn1crypto 0.24.0 py37_1003 conda-forge astroid 2.2.5 py37_0 conda-forge atomicwrites 1.3.0 py_0 conda-forge attrs 19.1.0 py_0 conda-forge babel 2.7.0 py_0 conda-forge black 19.3b0 py_0 conda-forge bokeh 1.3.4 py37_0 conda-forge boost-cpp 1.70.0 h8e57a91_2 conda-forge bzip2 1.0.8 h516909a_0 conda-forge ca-certificates 2019.6.16 hecc5488_0 conda-forge cairo 1.16.0 hfb77d84_1002 conda-forge cartopy 0.17.0 py37he1be148_1005 conda-forge certifi 2019.6.16 py37_1 conda-forge cffi 1.12.3 py37h8022711_0 conda-forge cfitsio 3.470 hb60a0a2_2 conda-forge chardet 3.0.4 py37_1003 conda-forge click 7.0 py_0 conda-forge click-plugins 1.1.1 py_0 conda-forge cligj 0.5.0 py_0 conda-forge cloudpickle 1.2.1 py_0 conda-forge cmocean 2.0 py_1 conda-forge colorspacious 1.1.2 pyh24bf2e0_0 conda-forge coverage 4.5.4 py37h516909a_0 conda-forge cryptography 2.7 py37h72c5cf5_0 conda-forge curl 7.65.3 hf8cf82a_0 conda-forge cycler 0.10.0 py_1 conda-forge cytoolz 0.10.0 py37h516909a_0 conda-forge dask 2.3.0 py_0 conda-forge dask-core 2.3.0 py_0 conda-forge dbus 1.13.6 he372182_0 conda-forge distributed 2.3.0 py_0 conda-forge docutils 0.15.2 py37_0 conda-forge entrypoints 0.3 py37_1000 conda-forge expat 2.2.5 he1b5a44_1003 conda-forge flake8 3.7.8 py37_1 conda-forge fontconfig 2.13.1 h86ecdb6_1001 conda-forge freetype 2.10.0 he983fc9_1 conda-forge freexl 1.0.5 h14c3975_1002 conda-forge fsspec 0.4.1 py_0 conda-forge geos 3.7.2 he1b5a44_1 conda-forge geotiff 1.5.1 h560c3f3_2 conda-forge gettext 0.19.8.1 hc5be6a0_1002 conda-forge giflib 5.1.7 h516909a_1 conda-forge glib 2.58.3 h6f030ca_1002 conda-forge gst-plugins-base 1.14.5 h0935bb2_0 conda-forge gstreamer 1.14.5 h36ae1b5_0 conda-forge hdf4 4.2.13 h9a582f1_1002 conda-forge hdf5 1.10.5 nompi_h3c11f04_1100 conda-forge heapdict 1.0.0 py37_1000 conda-forge icu 64.2 he1b5a44_0 conda-forge idna 2.8 py37_1000 conda-forge imagesize 1.1.0 py_0 conda-forge importlib_metadata 0.18 py37_0 conda-forge isort 4.3.21 py37_0 conda-forge jinja2 2.10.1 py_0 conda-forge jpeg 9c h14c3975_1001 conda-forge json-c 0.13.1 h14c3975_1001 conda-forge kealib 1.4.10 h58c409b_1005 conda-forge kiwisolver 1.1.0 py37hc9558a2_0 conda-forge krb5 1.16.3 h05b26f9_1001 conda-forge lazy-object-proxy 1.4.1 py37h516909a_0 conda-forge libblas 3.8.0 12_openblas conda-forge libcblas 3.8.0 12_openblas conda-forge libcurl 7.65.3 hda55be3_0 conda-forge libdap4 3.20.2 hd48c02d_1000 conda-forge libedit 3.1.20170329 hf8c457e_1001 conda-forge libffi 3.2.1 he1b5a44_1006 conda-forge libgcc-ng 9.1.0 hdf63c60_0 libgdal 3.0.1 hbef8c27_6 conda-forge libgfortran-ng 7.3.0 hdf63c60_0 libiconv 1.15 h516909a_1005 conda-forge libkml 1.3.0 h4fcabce_1010 conda-forge liblapack 3.8.0 12_openblas conda-forge libnetcdf 4.6.2 h056eaf5_1002 conda-forge libopenblas 0.3.7 h6e990d7_1 conda-forge libpng 1.6.37 hed695b0_0 conda-forge libpq 11.5 hd9ab2ff_0 conda-forge libspatialite 4.3.0a he1bb1e1_1029 conda-forge libssh2 1.8.2 h22169c7_2 conda-forge libstdcxx-ng 9.1.0 hdf63c60_0 libtiff 4.0.10 h57b8799_1003 conda-forge libuuid 2.32.1 h14c3975_1000 conda-forge libxcb 1.13 h14c3975_1002 conda-forge libxml2 2.9.9 hee79883_2 conda-forge locket 0.2.0 py_2 conda-forge lz4-c 1.8.3 he1b5a44_1001 conda-forge markupsafe 1.1.1 py37h14c3975_0 conda-forge matplotlib 3.1.1 py37_1 conda-forge matplotlib-base 3.1.1 py37he7580a8_1 conda-forge mccabe 0.6.1 py_1 conda-forge more-itertools 7.2.0 py_0 conda-forge msgpack-python 0.6.1 py37h6bb024c_0 conda-forge ncurses 6.1 hf484d3e_1002 conda-forge numpy 1.17.0 py37h95a1406_0 conda-forge numpydoc 0.9.1 py_0 conda-forge olefile 0.46 py_0 conda-forge openjpeg 2.3.1 h58a6597_0 conda-forge openssl 1.1.1c h516909a_0 conda-forge owslib 0.18.0 py_0 conda-forge packaging 19.0 py_0 conda-forge pandas 0.25.0 py37hb3f55d8_0 conda-forge partd 1.0.0 py_0 conda-forge pcre 8.41 hf484d3e_1003 conda-forge pillow 6.1.0 py37h6b7be26_1 conda-forge pip 19.2.2 py37_0 conda-forge pixman 0.38.0 h516909a_1003 conda-forge pluggy 0.12.0 py_0 conda-forge pooch 0.5.2 py37_0 conda-forge poppler 0.67.0 ha967d66_7 conda-forge poppler-data 0.4.9 1 conda-forge postgresql 11.5 hc63931a_0 conda-forge proj4 6.1.0 he751ad9_2 conda-forge psutil 5.6.3 py37h516909a_0 conda-forge pthread-stubs 0.4 h14c3975_1001 conda-forge py 1.8.0 py_0 conda-forge pycodestyle 2.5.0 py_0 conda-forge pycparser 2.19 py37_1 conda-forge pyepsg 0.4.0 py_0 conda-forge pyflakes 2.1.1 py_0 conda-forge pygments 2.4.2 py_0 conda-forge pykdtree 1.3.1 py37h3010b51_1002 conda-forge pylint 2.3.1 py37_0 conda-forge pyopenssl 19.0.0 py37_0 conda-forge pyparsing 2.4.2 py_0 conda-forge pyproj 2.2.1 py37hc44880f_0 conda-forge pyqt 5.9.2 py37hcca6a23_2 conda-forge pyshp 2.1.0 py_0 conda-forge pysocks 1.7.0 py37_0 conda-forge pytest 5.1.0 py37_0 conda-forge pytest-cov 2.7.1 py_0 conda-forge python 3.7.3 h33d41f4_1 conda-forge python-dateutil 2.8.0 py_0 conda-forge pytz 2019.2 py_0 conda-forge pyyaml 5.1.2 py37h516909a_0 conda-forge qt 5.9.7 h0c104cb_3 conda-forge rasterio 1.0.25 py37h900e953_2 conda-forge readline 8.0 hf8c457e_0 conda-forge requests 2.22.0 py37_1 conda-forge rockhound 0.1.0+5.g39043fa dev_0 <develop> scipy 1.3.1 py37h921218d_2 conda-forge setuptools 41.0.1 py37_0 conda-forge shapely 1.6.4 py37hec07ddf_1006 conda-forge sip 4.19.8 py37hf484d3e_1000 conda-forge six 1.12.0 py37_1000 conda-forge snowballstemmer 1.9.0 py_0 conda-forge snuggs 1.4.6 py_0 conda-forge sortedcontainers 2.1.0 py_0 conda-forge sphinx 1.8.5 py37_0 conda-forge sphinx-gallery 0.4.0 py37_0 conda-forge sphinx_rtd_theme 0.4.3 py_0 conda-forge sphinxcontrib-websupport 1.1.2 py_0 conda-forge sqlite 3.29.0 hcee41ef_0 conda-forge tbb 2018.0.5 h2d50403_0 conda-forge tblib 1.4.0 py_0 conda-forge tiledb 1.6.2 h69c774e_0 conda-forge tk 8.6.9 hed695b0_1002 conda-forge toml 0.10.0 py_0 conda-forge toolz 0.10.0 py_0 conda-forge tornado 6.0.3 py37h516909a_0 conda-forge tzcode 2019a h516909a_1002 conda-forge urllib3 1.25.3 py37_0 conda-forge viscm 0.7 pyh24bf2e0_0 conda-forge wcwidth 0.1.7 py_1 conda-forge wheel 0.33.4 py37_0 conda-forge wrapt 1.11.2 py37h516909a_0 conda-forge xarray 0.12.3 py_0 conda-forge xerces-c 3.2.2 h8412b87_1004 conda-forge xorg-kbproto 1.0.7 h14c3975_1002 conda-forge xorg-libice 1.0.10 h516909a_0 conda-forge xorg-libsm 1.2.3 h84519dc_1000 conda-forge xorg-libx11 1.6.8 h516909a_0 conda-forge xorg-libxau 1.0.9 h14c3975_0 conda-forge xorg-libxdmcp 1.1.3 h516909a_0 conda-forge xorg-libxext 1.3.4 h516909a_0 conda-forge xorg-libxrender 0.9.10 h516909a_1002 conda-forge xorg-renderproto 0.11.1 h14c3975_1002 conda-forge xorg-xextproto 7.3.0 h14c3975_1002 conda-forge xorg-xproto 7.0.31 h14c3975_1007 conda-forge xz 5.2.4 h14c3975_1001 conda-forge yaml 0.1.7 h14c3975_1001 conda-forge zict 1.0.0 py_0 conda-forge zipp 0.5.2 py_0 conda-forge zlib 1.2.11 h516909a_1005 conda-forge zstd 1.4.0 h3b9ef0a_0 conda-forge ```
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3230/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 21.357ms · About: xarray-datasette