I have multiple figures in a column in a bokeh plot. I want to apply the same tool transformation on all the images at the same time ie, if I zoom on one figure, all the plots should zoom, if I pan one, they should all pan, if I reset one, they should all reset (don't really care about hover, I'd be ecstatic with zoom, pan and reset).
Is there a bokeh way to link figures or do I need some custom Javascript for that (if so what would that be)?
Thanks in advance.
EDIT:
Thank you to @bigreddot and @Abhinav for the solution. You need both their answers as described here: Linking Plots . The range facilitates the Pan and the same datasource facilitates the zoom,
Modified Solution from layouts example:
from bokeh.io import output_file, show
from bokeh.layouts import column
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource
from bokeh.models import PanTool,ResetTool,BoxZoomTool
output_file("layout.html")
x = list(range(11))
y0 = x
y1 = [10 - i for i in x]
y2 = [abs(i - 5) for i in x]
tools=[BoxZoomTool(), PanTool(), ResetTool()]
datasource = ColumnDataSource({'x': x, 'y0': y0, 'y1': y1, 'y2': y2})
# create a new plot
s1 = figure(plot_width=250, plot_height=250, title=None,tools=tools)
s1.circle('x', 'y0', size=10, color="navy", alpha=0.5, source=datasource)
# create another one
s2 = figure(plot_width=250, plot_height=250, title=None,tools=tools,x_range=s1.x_range,y_range=s1.y_range)
s2.triangle('x', 'y1', size=10, color="firebrick", alpha=0.5, source=datasource)
# create and another
s3 = figure(plot_width=250, plot_height=250, title=None,tools=tools,x_range=s1.x_range,y_range=s1.y_range)
s3.square('x', 'y2', size=10, color="olive", alpha=0.5, source=datasource)
# put the results in a column and show
show(column(s1, s2, s3))