本文介绍了默认取消选择散景工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用散景"工具时,默认情况下始终选择一个(通常为平移").有没有一种方法可以取消所有工具的选择,同时仍然可以使用它们呢?这样,读者不太可能偶然弄乱情节,尤其是在小型移动设备上.
When Bokeh tools are available, one is always selected by default (normally "pan"). Is there a way to have all tools be deselected while still making them available? This way the reader is less likely to mess up the plot by accident, especially on a small mobile device.
推荐答案
从Bokeh 0.12开始,可以配置哪些工具处于活动状态:
As of Bokeh 0.12 or so, it is possible to 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]
这篇关于默认取消选择散景工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!