home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 295498327

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
295498327 MDU6SXNzdWUyOTU0OTgzMjc= 1896 _color_palette not using full range of colors if seaborn is installed 10194086 closed 0     2 2018-02-08T12:43:45Z 2018-02-16T21:08:32Z 2018-02-16T21:08:32Z MEMBER      

python from xarray.plot.utils import import_seaborn _color_palette('Greys', 3) Returns 0.85, ... 0.58, ... 0.31, ...

if seaborn is installed, and

1.00, ... 0.58, ... 0.00, ...

otherwise

Problem description

the return value of _color_palette('Greys', 3) is different when seaborn is installed or not.

The relevant code is here: https://github.com/pydata/xarray/blob/6aa225f5dae9cc997e232c11a63072923c8c0238/xarray/plot/utils.py#L115 https://github.com/pydata/xarray/blob/6aa225f5dae9cc997e232c11a63072923c8c0238/xarray/plot/utils.py#L143

The same logic in seaborn https://github.com/mwaskom/seaborn/blob/0beede57152ce80ce1d4ef5d0c0f1cb61d118375/seaborn/palettes.py#L411

Intuitively I prefer the xarray solution because this uses the full range of colors which I find beneficial, however there may be a reason for this I'm not aware of.

Maybe @mwaskom will answer: mwaskom/seaborn#1372

Expected Output

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.5.4.final.0 python-bits: 64 OS: Linux OS-release: 3.13.0-141-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.0 pandas: 0.21.0 numpy: 1.13.3 scipy: 1.0.0 netCDF4: 1.3.1 h5netcdf: 0.5.0 Nio: None bottleneck: 1.2.1 cyordereddict: None dask: 0.16.0 matplotlib: 2.1.1 cartopy: 0.15.1 seaborn: 0.8.1 setuptools: 38.2.4 pip: 9.0.1 conda: None pytest: None IPython: 6.2.1 sphinx: None

~~

edit:

sorry I pressed the button to early

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1896/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

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