我正试图在点击点的散点图上找到最近的邻居。 所以我需要知道点击了哪个点。下面我只是简单地显示所有的点和悬停
all_points = hv.Points(
df_all_points, ['y', 'x'],
['x', 'y', 'z']
)
tooltips = [
('Index', '@z')
]
hover = HoverTool(tooltips=tooltips)
all_points.opts(
tools=[hover], color='black',
line_color='black', size=10,
width=width, height=height,
show_grid=True)
那么,有可能用全息视图来实现这一点吗
当然。通过http://holoviews.org/user_guide/Custom_Interactivity.html中的点击流和双击流,您可以找到用户单击的位置
相关问题 更多 >
编程相关推荐