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
Plotting norm is superseded by xarray vmin and vmax #2381
Comments
Thanks for bringing this up! @dcherian @fmaussion I'm going to defer to your judgment here... |
Yes this looks sensible to me and is an easy fix I think. @juseg PR welcome! |
I was working on it but you were quicker, thanks! |
Ooops. Sorry! @juseg |
@dcherian Thanks! This works for me. I appreciate that my current code using the workaround Edit: I just checked that matplotlib's imshow accepts |
* Properly support user-provided norm. Fixes #2381 * remove top level mpl import. * More accurate error message. * whats-new fixes.
Code Sample
Problem description
When passing a norm argument to imshow etc, the norm is forwarded to matplotlib but its data bounds are replaced with those calculated by xarray.
Expected Output
I think that the norm's
vmin
andvmax
should take precedence over xarray-generatedvmin
andvmax
.Output of
xr.show_versions()
xarray: 0.10.8
pandas: 0.23.4
numpy: 1.15.0
scipy: 1.1.0
netCDF4: 1.4.1
h5netcdf: None
h5py: None
Nio: None
zarr: None
bottleneck: None
cyordereddict: None
dask: 0.18.2
distributed: None
matplotlib: 2.2.3
cartopy: 0.15.1
seaborn: None
setuptools: 40.0.0
pip: 18.0
conda: None
pytest: None
IPython: 5.8.0
sphinx: 1.7.6
The text was updated successfully, but these errors were encountered: