我想点击并拖动散点图散点图的点 . 任何想法如何做到这一点?
(编辑:这是an example我想做的事情)
对于散射的示例,下面的代码生成在this page中途找到的散点图 .
from bokeh.plotting import figure, output_file, show
# create a Figure object
p = figure(width=300, height=300, tools="pan,reset,save")
# add a Circle renderer to this figure
p.circle([1, 2.5, 3, 2], [2, 3, 1, 1.5], radius=0.3, alpha=0.5)
# specify how to output the plot(s)
output_file("foo.html")
# display the figure
show(p)
1 回答
多手势编辑工具只是最近添加的,landing in version 0.12.14 . 您可以在“用户指南”的Edit Tools部分中找到更多信息 .
具体为能够按照OP中的描述移动点,使用PointDrawTool:
下面是一个完整的示例,您可以运行它还有一个数据表,显示字形在移动时的更新坐标(您需要先在工具栏中激活该工具,默认情况下它是关闭的):