默认取消选择散景工具

bon*_*ang 5 python bokeh

当散景工具可用时,默认情况下始终选择其中一个(通常为“平移”)。有没有办法取消选择所有工具,同时仍然使它们可用?这样读者就不太可能意外地搞乱情节,尤其是在小型移动设备上。

big*_*dot 3

从 Bokeh 0.12 左右开始,可以配置哪些工具处于活动状态:

# configure so that no drag tools are active
plot.toolbar.active_drag = None

# configure so that Bokeh chooses what (if any) scroll tool is active
plot.toolbar.active_scroll = "auto"

# configure so that a specific PolySelect tap tool is active
plot.toolbar.active_tap = poly_select

# configure so that a sequence of specific inspect tools are active
# note: this only works for inspect tools
plot.toolbar.active_inspect = [hover_tool, crosshair_tool]
Run Code Online (Sandbox Code Playgroud)