Open CRiddler opened 5 years ago
The immediate bug here is that despite using a categorical axis it should sort the values if they are numeric by default. The secondary and more fundamental improvement, which I think there is another issue for, is to allow defining categorical order via Dimension.values
.
Hello, I've come across what I believe is a bug in transforming a
hv.Dataset
to ahv.BoxWhisker
plot. In a HoloMap, when I plot nested data (categorical) to aBoxWhisker
if one of the category levels is missing, the missing level is always placed on the right end of the plot. This issue strangely only occurs when I plot aBoxWhisker
, if I aggregate my data so that I can plot it toBars
the missing category level appears in the proper place along the x-axis. I am running holoviews version 1.11.2I've supplied a copy/paste example (can be run in a notebook). Note that in the data, I have one dataset that has all of the nested levels, and in the other, I have purposefully dropped out all the values pertaining to the level ["C", "3"].
The plots in the left column reflect the
full_data
plots, whereas the right column comes from the data that is missing level "C3". In theBoxWhisker
plot of the right column, the missing value is all the way on the right. A closer look at the xticks reveals that they've been sorted to [1, 2, 4, 3]. Whereas in theBars
plot in the right column, the missing "C3" bar is properly accounted for in the correct position. No matter what I've tried (I'm not super experienced withholoviews
so take this with a grain of salt), I can not reorder the x-axis of theBoxWhisker
to keep the missingBoxWhisker
in the correct place.