10

In matplotlib you can share the x-axis between plots like so:

plt.subplots(nrows=2, sharex=True)

I would like to do something similar in Bokeh, where I zoom one, the other will follow, etc. How would I do that in Bokeh?

Jonas Byström
  • 25,316
  • 23
  • 100
  • 147

1 Answers1

17

This is documented in the Linking Plots section of the User's Guide. You only need to share ranges objects:

p1 = figure()

# share just the x-range between these plots
p2 = figure(x_range=p1.x_range)
bigreddot
  • 33,642
  • 5
  • 69
  • 122