Linking TimeSeries charts for panning/zooming

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

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 <[email protected]> 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 [email protected].
To post to this group, send email to [email protected].
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\.