Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make bokeh toolbar tools inactive by default

Tags:

python

bokeh

Is there a way to make all tools in the toolbar inactive? Having pan and wheel-zoom buttons active by default is counterproductive when scrolling in an IPython notebook.

like image 867
Miske Avatar asked Jan 28 '15 16:01

Miske


Video Answer


1 Answers

Here is a link to the docs regarding setting active tools on bokeh 0.12.3:

http://docs.bokeh.org/en/latest/docs/user_guide/tools.html#setting-the-active-tools.

In your case when you define the figure you can just set active_drag and active_scroll to None. For example:

from bokeh.plotting import figure
fig = figure(active_drag=None, active_scroll=None)  # no active tools by default 
like image 187
derchambers Avatar answered Sep 16 '22 14:09

derchambers