简体   繁体   中英

Bokeh: Wheel_Zoom with decoupled y-Axis

I render a plot in Bokeh using two independent y-Axis:

    pAltitude = figure(plot_width=800, plot_height=300, x_range=pElev.x_range)
    pAltitude.extra_y_ranges = {"speed": Range1d(50, 120)}
    pAltitude.add_layout(LinearAxis(y_range_name="speed"), 'right')

When this plot is shown in the browser I can use the wheel_zoom tool to zoom in and out of the plot.When hovering the mouse over the x-axis, only the timescale is zoomed in and out, when hovering over one of the y-axis, only the y-scale is zoomed.

So far, so good: Is there a possibility to decouple the two y-axis for wheel zooming (and panning)?

I'd like to have only the ordinary y-axis zoomed when hovering over it and only the extra y-axis zoomed when hovering over that one.

Currently, both axis are coupled ad I cannot zoom or pan them individually.

Thanks a lot!

However

It is not currently possible (as of version 1.4, and upcoming 2.0) to uncouple "twin" axes. Scaling one range will always scale the other by the same relative amount.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM