-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xr.plot infers sequential colormap on diverging levels #3524
Labels
Comments
hmm... it's also weird if you specified Here's where you should look if you want to jump in :) Lines 141 to 154 in 810345c
|
dcherian
added a commit
to dcherian/xarray
that referenced
this issue
Mar 29, 2020
dcherian
added a commit
to dcherian/xarray
that referenced
this issue
Mar 29, 2020
4 tasks
It might be worth taking a look at updating our heuristics. They were originally copied from seaborn, but seaborn has since updated them to something a little different. |
dcherian
added a commit
that referenced
this issue
Apr 5, 2020
* Use divergent colormap if lowest and highest level span 0 Fixes #3524 * sort levels by default. * better levels check
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MCVE Code Sample
Expected Output
A diverging colormap, maybe?
Problem Description
I was surprised by getting the viridis colormap until I realised that my data must all be positive and the colormap is infered from the data and not from levels. However, when specifying the range via
vmax=2, center=0
it is not inferred from the data.Output of
xr.show_versions()
xarray: 0.14.0+44.g4dce93f1
pandas: 0.25.2
numpy: 1.17.3
scipy: 1.3.1
netCDF4: 1.5.0.1
pydap: None
h5netcdf: 0.7.4
h5py: 2.9.0
Nio: None
zarr: None
cftime: 1.0.4.2
nc_time_axis: 1.2.0
PseudoNetCDF: None
rasterio: 1.0.22
cfgrib: None
iris: None
bottleneck: 1.2.1
dask: 2.6.0
distributed: 2.6.0
matplotlib: 3.1.1
cartopy: 0.17.0
seaborn: 0.9.0
numbagg: None
setuptools: 41.4.0
pip: 19.3.1
conda: None
pytest: 5.2.2
IPython: 7.9.0
sphinx: 2.2.1
The text was updated successfully, but these errors were encountered: