Bespoke heatmap hover which adjusts linked histogram

I have a clustermap plot currently created in matplotlib/seaborn, that I’ve made dynamic (using the mpld3 library), so that when I hover over each square of the heatmap, a separate histogram is plotted above the heatmap (small video here; in the full example I expect to use a heatmap of ~250 x 250 categories).

It has been suggested that I should consider doing this in bokeh instead, but I have no experience with this. I see that there is a clustermap implementation at bokehheat · PyPI but I have not found anyone implementing a bokeh histogram which updates on hovering over a heatmap. In bokeh, is it relatively easy to implement dynamic plots which are updated on hovering over specific plot regions, and if so, could someone give me some pointers or links to get me started?

Thanks!

Yan

Hi @Yan_Wong I would say the answer to your question is “Yes” but the best way to get concrete, specific help out of the forum is to present a prototype of some sort and ask how to improve or fix it. To that end, there is a section in the docs that describes how to create (JS) callbacks on hover:

Perhaps you can make an attempt based of that and then from that concrete start we can offer more concrete advice. That example updates the ColumnDataSource for a second glyph on the same plot, but there is no difference if you wanted to update a glyph from a separate plot.