Reputation: 71
I'm a bit new to Bokeh, and I've been struggling with getting the xwheel_pan tool to work. I've tried this. I can change the tools argument to anything except xwheel_pan and ywheel_pan for some reason. I'm using Bokeh version 1.4.0
import numpy as np
from bokeh.plotting import figure, show
p = figure(plot_width = 900, tools='xwheel_pan')
lines = [p.line(np.arange(10), np.random.random(10)) for i in range(3)]
show(p)
Upvotes: 0
Views: 164
Reputation: 416
As written, your code almost works, except I found that the xwheel_scroll isn't active by default-- you have to click the tool icon on the toolbar to turn it on, and then it works.
In the arguments to figure
, right after you declare tools
, specify the active scrolling tool, like this:
p = figure(plot_width=900, tools='xwheel_pan', active_scroll='xwheel_pan')
See if that does what you expect.
Upvotes: 2