You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
mathause
changed the title
_color_palette not use full range of colors if s
_color_palette not useing full range of colors if seaborn is installed
Feb 8, 2018
mathause
changed the title
_color_palette not useing full range of colors if seaborn is installed
_color_palette not using full range of colors if seaborn is installed
Feb 8, 2018
Using seaborn as a fall-back here was probably a mistake. It's better to give consistent results independently of whether an optional dependency is installed.
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:
xarray/xarray/plot/utils.py
Line 115 in 6aa225f
xarray/xarray/plot/utils.py
Line 143 in 6aa225f
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()
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
The text was updated successfully, but these errors were encountered: