-
-
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
How to plot boolean vector with current xarray #3722
Labels
Comments
matplotlib can plot Lines 528 to 565 in ecd67f4
This should be an easy fix if you are up for it. A workaround would be to do |
dcherian, I would appreciate that fix. That is exactly the solution that I use locally. |
If you have a time, we would appreciate a PR. if not, no worries. |
MeraX
added a commit
to MeraX/xarray
that referenced
this issue
Feb 12, 2020
Fixes pydata#3722 . > matplotlib can plot `bool` values so we should add that to the check in `_ensure_plottable`.
dcherian
added a commit
that referenced
this issue
Apr 3, 2020
* Allow plotting bool data Fixes #3722 . > matplotlib can plot `bool` values so we should add that to the check in `_ensure_plottable`. * Add tests + raise nicer error when asked to plot unsupported types * Add whats-new Co-authored-by: dcherian <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear all,
I'm trying to plot a vector with bool data. It used to work with xarray version 0.10.7 in an old setup, but it isn't working anymore. Am I doing something wrong or is there something new to consider?
I'm not hundred percent sure, if this problem is due to changes in xarray, numpy or something else
Code example
Expected Output
A plot with a line from 1 to 0.
Problem Description
However, I get this error:
Output of
xr.show_versions()
in the setup that is not workingxarray: 0.14.1
pandas: 0.25.3
numpy: 1.18.1
scipy: 1.2.0
netCDF4: 1.4.2
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: 1.0.3.4
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 2.9.2
distributed: None
matplotlib: 3.1.2
cartopy: 0.17.0
seaborn: 0.9.0
numbagg: None
setuptools: 40.6.3
pip: 20.0.1
conda: None
pytest: None
IPython: 7.2.0
sphinx: None
Output of
xr.show_versions()
in the setup that was workingxarray: 0.10.7
pandas: 0.22.0
numpy: 1.14.2
scipy: 1.0.0
netCDF4: 1.3.1
h5netcdf: None
h5py: 2.6.0
Nio: None
zarr: None
bottleneck: None
cyordereddict: None
dask: 1.1.3
distributed: None
matplotlib: 2.2.0
cartopy: 0.16.0
seaborn: 0.8.1
setuptools: 26.1.1
pip: 19.3.1
conda: None
pytest: None
IPython: 6.2.1
The text was updated successfully, but these errors were encountered: