当Bokeh工具可用时,默认情况下总是选择一个(通常为“pan”)。有没有办法让所有工具在取消选择的同时取消选择?这样,读者不太可能意外地弄乱情节,特别是在小型移动设备上。
答案 0 :(得分:1)
截至Bokeh 0.12左右,可以configure which tools are active:
# 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]