Add Radial Heatmap
See original GitHub issueProposal
Radial heatmaps are great for visualizing periodicity. I would like to help adding radial heatmaps to holoviews.
I’ve implemented radial heatmaps in bokeh, as you can see here:
The link to the notebook including the code can be found here.
First steps
I started to take a closer look on how to implement a radial heatmap in holoviews having a working bokeh example. Here are some considerations:
- Data wise, radial heatmaps are very much like a normal, rectular heatmap. Both have 2 key dimensions and one or more value dimension whereas the first value dimension is used for color. Hence, the Heatmap Element class is the perfect data container.
- Plotting wise, the corresponding HeatmapPlot provides the basic functionality. The
get_data
method needs to be adjusted to compute radius, radients and so on (which is no big deal having a working example)
Issues
However, I’ve ran into 2 concrete problems:
-
Since radial and rectular heatmaps are very similar, they could be represented within the same class (e.g. HeatmapPlot). To select either a radial or rectular heatmap, a parameter could be used like in grouped or stacked bar plots. However, the underlying glyphs for radial (annular_wedge) and rectular (rect) heatmaps differ. By design, a plot class may only have one single key for
_plot_methods
, right? Therefore, my current guess is to create a new plotting class (and hence a new element class). -
The radial heatmap requires axis labels to be positioned manually since radial axis to not exist. Because of that, I need to add text glyphs to the annular_wedge glyphs. Furthermore, I would like to add some visual marker to increase readability of the chart, like those bold white lines in the following plot which results in 3 different glyphs (annular_wedge, text and multi_line). How can I integrate different glyphs in the same plot? Overlay?:
Thanks for your advice.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
As a quick aside, I don’t know your preferred workflow but I usually prototype new plots in a notebook (e.g. see https://anaconda.org/philippjfr/bars/notebook) and then move it into the code. I think writing a separate RadialHeatMapPlot makes sense, you can simply override the default HeatMapPlot for now using
hv.Store.register({HeatMap: RadialHeatMapPlot}, 'bokeh')
and then I’d be happy to solve the issue of switching between plotting classes (probably by adding a plot option).I fixed some of the more important issues in #2140, so you should be able to implement it now.