-
-
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
Binned coordinates (pd.Interval) not plottable on the y-axis. #3571
Labels
Comments
Thanks for the report @juseg. It looks like the logic here needs to be updated: Lines 300 to 323 in ff6051d
Note that the 2D plotting functions do this: Lines 697 to 698 in ff6051d
This should be relatively easy fix if you're up for it. |
4 tasks
dcherian
pushed a commit
that referenced
this issue
Jan 22, 2020
* Allow binned coords on 1D plots y-axis. See #3571. * Add helper to convert intervals for 1d plots. * Add tests for line plots with x/y/x&y intervals. * Add tests for step plots with x/y intervals. * Simplify syntax in 1D intervals plot helper. * Document new handling of y-axis intervals.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimal Code Sample
Expected Output
I would like to plot binned data (produced with
groupby_bins
) with transposed axes, i.e. data on the x-axis, and bins on the y-axis.Problem Description
Attempting to plot using an array of
pd.Interval
on the y-axis yields the followingTypeError
. The error message reports data should be numeric, dates orpd.Interval
, which they are.Output of
xr.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.7.4 (default, Oct 4 2019, 06:57:26)
[GCC 9.2.0]
python-bits: 64
OS: Linux
OS-release: 4.19.84-1-MANJARO
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: fr_CH.utf8
LOCALE: fr_CH.UTF-8
libhdf5: 1.10.5
libnetcdf: 4.7.2
xarray: 0.14.1
pandas: 0.25.2
numpy: 1.17.3
scipy: 1.3.1
netCDF4: 1.5.3
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: 1.0.4.2
nc_time_axis: None
PseudoNetCDF: None
rasterio: 1.1.0
cfgrib: None
iris: None
bottleneck: None
dask: 2.5.2
distributed: 0+untagged.1.gd096901.dirty
matplotlib: 3.1.1
cartopy: 0.17.0
seaborn: None
numbagg: None
setuptools: 41.2.0
pip: 19.2.3
conda: None
pytest: 5.2.1
IPython: 7.9.0
sphinx: 2.2.1
The text was updated successfully, but these errors were encountered: