We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hue
import xarray as xr xr.DataArray([[1,2,3], [4,5,6]], dims=("a", "b")).plot(x="a", hue="c") # note: it should be hue="b"
What happened: raises
ValueError: y must be one of None, 'a', 'b'
What you expected to happen:
ValueError: hue must be one of None, 'a', 'b'
Environment:
commit: None python: 3.7.7 (default, Mar 23 2020, 22:36:06) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 3.16.0-4-amd64 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: en_US.utf-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.5 libnetcdf: 4.6.3
xarray: 0.16.2 pandas: 1.2.1 numpy: 1.19.2 scipy: 1.5.2 netCDF4: 1.5.4 pydap: installed h5netcdf: None h5py: 2.10.0 Nio: None zarr: 2.6.1 cftime: 1.3.1 nc_time_axis: None PseudoNetCDF: None rasterio: 1.1.0 cfgrib: None iris: None bottleneck: None dask: 2021.01.1 distributed: 2021.01.1 matplotlib: 3.3.2 cartopy: 0.18.0 seaborn: 0.11.1 numbagg: None pint: 0.16.1 setuptools: 52.0.0.post20210125 pip: 20.3.3 conda: 4.9.2 pytest: 6.2.2 IPython: 7.20.0 sphinx: 3.4.3
The text was updated successfully, but these errors were encountered:
the issue here is that if y is None we pretend y=hue:
y is None
y=hue
xarray/xarray/plot/plot.py
Line 68 in fbd48d4
_infer_xy_labels
_assert_valid_xy(darray, hue, "hue")
Edit: I think I would prefer the refactor, but the _assert_valid_xy fix is a single line...
_assert_valid_xy
Sorry, something went wrong.
Cool! Thanks for fixing it :)
Successfully merging a pull request may close this issue.
What happened:
raises
What you expected to happen:
Environment:
Output of xr.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.7.7 (default, Mar 23 2020, 22:36:06)
[GCC 7.3.0]
python-bits: 64
OS: Linux
OS-release: 3.16.0-4-amd64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: en_US.utf-8
LOCALE: en_US.UTF-8
libhdf5: 1.10.5
libnetcdf: 4.6.3
xarray: 0.16.2
pandas: 1.2.1
numpy: 1.19.2
scipy: 1.5.2
netCDF4: 1.5.4
pydap: installed
h5netcdf: None
h5py: 2.10.0
Nio: None
zarr: 2.6.1
cftime: 1.3.1
nc_time_axis: None
PseudoNetCDF: None
rasterio: 1.1.0
cfgrib: None
iris: None
bottleneck: None
dask: 2021.01.1
distributed: 2021.01.1
matplotlib: 3.3.2
cartopy: 0.18.0
seaborn: 0.11.1
numbagg: None
pint: 0.16.1
setuptools: 52.0.0.post20210125
pip: 20.3.3
conda: 4.9.2
pytest: 6.2.2
IPython: 7.20.0
sphinx: 3.4.3
The text was updated successfully, but these errors were encountered: