I would like make a DynamicMap with multiple plots which share some dynamic parameters. Each plot should accept a mouse click and adjust the global set of parameters for all plots. So I wrote the plots
import holoviews as hv hv.notebook_extension("bokeh") def dynamic_plot(x, y, z): return hv.Points([(x, y)], kdims=["x", "y"]) + hv.Points([(z, y)], kdims=["z", "y"]) hv.DynamicMap(dynamic_plot, kdims=["x", "y", "z"]).redim.range( x=(0.0, 1.0), y=(0.0, 1.0), z=(0.0, 1.0) ).redim.default(x=0.5, y=0.5, z=0.5)
which creates 2 plots with a single point. Note that the plots share the y-value.
What I need now is a mouse click (Tap) event which will reposition the points. The plot I click should move the point to the click location, however the other plot should also update it’s y-location (while keeping the horizontal location the same). Also the title and the sliders should update their x,y,z value. Therefore a click in a plot will update 2 of the 3 values.
I’ve tried creating streams with Tap for the Dynamic map, but I do not know how let the streams react to separate plots. While I saw a “source” parameter, I’m not sure how to use it here as my diagram is created dynamically.
How can I achieve the described mouse click updates?
(this is a much simplified version from what I actually want to achieve in the end: python - How to connect multiple Tap streams for multiple plots in Holoviews? - Stack Overflow - I hope my simplified example captures what I need)