from bokeh.layouts import row
from bokeh.models import Button, CustomJS
from bokeh.plotting import figure, show
p1 = figure()
p1.circle([1, 2, 3, 4, 5], [2, 5, 8, 2, 7])
p2 = figure()
p2.circle([2, 5, 8, 2, 7], [1, 2, 3, 4, 5])
b = Button(label="Reset all plots")
b.js_on_click(CustomJS(code="""\
document.querySelectorAll('.bk-tool-icon-reset[title="Reset"]').forEach(d => d.click())
"""))
show(row(p1, p2, b))
One thing to note - I didn’t use Bokeh.index because it requires traversing the whole tree structure when layouts have any level of nesting (rows, columns, grids).
The method in the code block just finds the HTML elements that represent the reset buttons and clicks on them. So it will work only if there is such a button on a plot. Also, the code will break if something relevant changes in Bokeh (a different class name or a different tool name or not using the title attribute). But since the BokehJS API is not yet considered stable, the same can happen with Bokeh.index or any other method.