holoviews icon indicating copy to clipboard operation
holoviews copied to clipboard

Empty Box-Whisker plot with the Matplotlib backend when vdims has NaNs

Open maximlt opened this issue 2 years ago • 2 comments

The following snippet correctly returns a Box-Whisker plot grouped by carrier with the Bokeh backend but just returns an empty plot with the matplotlib backend.

import holoviews as hv
from hvplot.sample_data import us_crime, airline_flights

flights = airline_flights.to_dask().persist()
flight_subset = flights[flights.carrier.isin(['AA', 'US', 'OH'])]

ds = hv.Dataset(flight_subset, kdims=['carrier'], vdims=['depdelay'])
hv.BoxWhisker(ds)

image

Note that this has nothing to do with Dask, since adding flight_subset = flight_subset.compute() has no effect.

I've done some exploration and found out that the depdelay column has NaNs values, replacing them with 0 (or any float) fixes the issue.

maximlt avatar Nov 09 '21 11:11 maximlt

Fixed by https://github.com/holoviz/holoviews/pull/5135

philippjfr avatar Nov 16 '21 12:11 philippjfr

Reopening this 1.14.8. hasn't solved this issue.

maximlt avatar Feb 22 '22 18:02 maximlt