在Matplotlib中,您可以在绘图之间共享x轴,如下所示:plt.subplots(nrows=2, sharex=True) 我希望在Bokeh中做类似的事情,即当我缩放一个时,另一个也会跟随缩放等。 我该如何在Bokeh中实现这个功能?
这在用户指南的连接图表部分有详细说明。您只需要共享区间对象:p1 = figure() # share just the x-range between these plots p2 = figure(x_range=p1.x_range)