I am trying to find nearest neighbors on a scatter plot on click of point. So I need to know which point has been clicked. Below I am simply showing all points and hover.
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)
So is it possible to do this with holoviews ??
Sure. The Tap and DoubleTap streams in http://holoviews.org/user_guide/Custom_Interactivity.html let you find where the user has clicked.