☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Linking TimeSeries charts for panning/zooming

Community Support
Shayan
Shayan

I’m trying to display 3 separate time series in 2 separate plots, but have them linked for panning and zooming, along the time axis.

The code:

#Load the dataframe into a ColumnDataSource
source = ColumnDataSource.from_df(sig_df)

sig_plot = TimeSeries(source, x=‘time’, y=[‘col1’, ‘col2’])

price_plot = TimeSeries(source, x=‘time’, y=‘col3’)

p = Column(sig_plot, price_plot)

show(p)

``

Although, both the plots are displayed, they don’t seem to be linked, i.e. they pan and zoom independently of each other

I have no idea what I’m doing wrong.

Any pointers would be appreciated.

Thanks

⌁   Link to post
Bryan
Bryan

If you wanted linked panning, you are better off using bokeh.plotting and figure(...). For time series charts it is almost an identical amount of code. You can find information about linked axes in the users guide:

  http://bokeh.pydata.org/en/latest/docs/user_guide/interaction/linking.html#userguide-interaction-linking

As well as information about making figure(...) use a datetime axis:

  http://bokeh.pydata.org/en/latest/docs/user_guide/plotting.html#datetime-axes

Thanks,

Bryan

···

On Oct 6, 2016, at 7:43 PM, Shayan <cybersquad007@gmail.com> wrote:

I'm trying to display 3 separate time series in 2 separate plots, but have them linked for panning and zooming, along the time axis.

The code:

#Load the dataframe into a ColumnDataSource
source = ColumnDataSource.from_df(sig_df)
sig_plot = TimeSeries(source, x='time', y=['col1', 'col2'])
price_plot = TimeSeries(source, x='time', y='col3')
p = Column(sig_plot, price_plot)
show(p)

Although, both the plots are displayed, they don't seem to be linked, i.e. they pan and zoom independently of each other

I have no idea what I'm doing wrong.
Any pointers would be appreciated.

Thanks

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ecc6122f-0272-4233-89d4-afe9b2ef7951%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled