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
xarray calculates the levels from vmax while matplotlib (probably) calculates the levels from data.max() and uses vmax only for the norm. For contourf and pcolormesh this is not so relevant as the capped values are then drawn with the over color. However, there may also be a good reason for this behavior.
Output of xr.show_versions()
INSTALLED VERSIONS
commit: 4c96d53
python: 3.7.6 | packaged by conda-forge | (default, Jan 7 2020, 22:33:48)
[GCC 7.3.0]
python-bits: 64
OS: Linux
OS-release: 4.12.14-lp151.28.36-default
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_US.UTF-8
libhdf5: 1.10.5
libnetcdf: 4.6.2
MCVE Code Sample
Expected Output
Problem Description
A
contour(vmax=vmax)
plot differs between xarray and matplotlib. I think the problem is here:xarray/xarray/plot/utils.py
Line 265 in 95e4f6c
xarray calculates the levels from
vmax
while matplotlib (probably) calculates thelevels
fromdata.max()
and usesvmax
only for thenorm
. Forcontourf
andpcolormesh
this is not so relevant as the capped values are then drawn with theover
color. However, there may also be a good reason for this behavior.Output of
xr.show_versions()
INSTALLED VERSIONS
commit: 4c96d53
python: 3.7.6 | packaged by conda-forge | (default, Jan 7 2020, 22:33:48)
[GCC 7.3.0]
python-bits: 64
OS: Linux
OS-release: 4.12.14-lp151.28.36-default
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_US.UTF-8
libhdf5: 1.10.5
libnetcdf: 4.6.2
xarray: 999 (master)
pandas: 0.25.3
numpy: 1.17.3
scipy: 1.4.1
netCDF4: 1.5.1.2
pydap: installed
h5netcdf: 0.7.4
h5py: 2.10.0
Nio: 1.5.5
zarr: 2.4.0
cftime: 1.0.4.2
nc_time_axis: 1.2.0
PseudoNetCDF: installed
rasterio: 1.1.0
cfgrib: 0.9.7.6
iris: 2.2.0
bottleneck: 1.3.1
dask: 2.9.2
distributed: 2.9.2
matplotlib: 3.1.2
cartopy: 0.17.0
seaborn: 0.9.0
numbagg: installed
setuptools: 45.0.0.post20200113
pip: 19.3.1
conda: None
pytest: 5.3.3
IPython: 7.11.1
sphinx: None
The text was updated successfully, but these errors were encountered: