Holoviews: Enhance hv.Distribution to natively support joyplots

Created on 25 Feb 2018  路  5Comments  路  Source: holoviz/holoviews

Proposal

Creating joyplots with Holoviews should not be too complicated using hv.Distribution with hv.Layout or hv.Overlay (or hv.NdOverlay). However, it would be great to abstract away the implementation within hv.Distribution.

joy_index
In the same way as hv.Bars has two variants via group_index and stack_index to distinguish groups of data, hv.Distribution could support an optional joy_index to distinguish different distributions. Using the joy_index option would automatically result in joy plots. color_index and cmap could be added for coloring different groups as in the referenced example above.

I think a group_index (or better overlay_index) could be also possible to simply overlay different distributions without distinguishing them vertically (as in joyplots) and without explicitly using overlays.


What is your opinion on this? I would be willing to give it a shot if you find this enhancement useful and appropriate. I took a quick look at the code and recognized the Compositor in combination with univariate_kde and Area. I have to get my head around the design here but it should be ok.

feature

Most helpful comment

It doesn't seem too difficult to add such a plot, given https://bokeh.pydata.org/en/latest/docs/gallery/ridgeplot.html ; PRs welcome!

But note that to keep the library neutral, it should be called Ridgeline and not Joy...

All 5 comments

I would love to see joy plots too. Your suggestion of a joy_index seems reasonable although I would also consider a Ridgeline or Joy element where the key dimension is the joy_index and the value dimension the values to compute the kdes over. In general I think we want to move away from index options in favor of making the dimension explicit or express it using op transforms (https://github.com/ioam/holoviews/pull/2152).

I agree - creating a dedicated Joy element is more explicit. I prefer your suggested approach.

I'm going to rename this issue accordingly if you don't mind.

joy plot would be very useful. +1

I'd love to see native joyplot integration. I think there are many instances in which they are superior to violin and boxplots when one wants to visualize and compare a large number of distributions in a single glance.

It doesn't seem too difficult to add such a plot, given https://bokeh.pydata.org/en/latest/docs/gallery/ridgeplot.html ; PRs welcome!

But note that to keep the library neutral, it should be called Ridgeline and not Joy...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ericmjl picture ericmjl  路  3Comments

rabernat picture rabernat  路  6Comments

lrdsouza picture lrdsouza  路  3Comments

jlstevens picture jlstevens  路  6Comments

ahuang11 picture ahuang11  路  5Comments