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
If I understand correctly then it gets piped through cmap_kwargs, which seems odd to me. Do you agree that this is a bug? Or am I missing a case where it would be preferable to pass extend directly to plot.contourf?
Now I'm confused why your initial statement didn't work.
It's a little funny because _determine_cmap_params autosets extend based on vmin, vmax. I think you should be able to modify _process_cmap_... to do the right thing so that cmap_params needn't be provided to _add_colorbar in _plot2d.
I agree extend is really a cbar_kwarg. Can you send in a PR to fix this?
By do the right thing I mean move extend to cbar_kwargs
Code Sample, a copy-pastable example if possible
I just stumbled on some weird behaviour, possibly a bug. When plotting with the
contourf
method, xarray ignores theextend
value passed tocbar_kwargs
When doing a similar plot with matplotlib this happens
Is xarray adjusting the colorbar to the
vmin
andvmax
inputs but not carrying thecbar_kwargs
for that step?This makes it especially hard to produce movies with (e.g. xmovie) because the colorbar
flickers
.If someone could point me to the right location in the code and tests, I would be happy to put together a PR.
Output of
xr.show_versions()
xarray: 0.12.0
pandas: 0.24.2
numpy: 1.16.2
scipy: 1.2.1
netCDF4: 1.5.0.1
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: 2.3.1
cftime: 1.0.3.4
nc_time_axis: 1.2.0
PseudonetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 1.1.5
distributed: 1.26.1
matplotlib: 3.0.3
cartopy: 0.17.0
seaborn: 0.9.0
setuptools: 40.8.0
pip: 19.0.3
conda: None
pytest: 4.4.2
IPython: 7.1.1
sphinx: None
The text was updated successfully, but these errors were encountered: