I am able to add a BoxSelectTool to my plot.
plot.add_tools(BoxSelectTool(dimensions="both"))
The tool shows up and I made a rectangular selection. But the documented method shows nothing for the selected points.
source.selected.indices
[] is returned. What is wrong. How do I get the selected indices?
after following the posts, I can get the embedded server working, and source.selected.indices does return the points, but call_back still does not work
def callback(attr, old, new):
print('select changed')
# The index of the selected glyph is : new['1d']['indices'][0]
patch_name = source.data['name'][new['1d']['indices'][0]]
print("TapTool callback executed on Patch {}".format(patch_name))
source.on_change('selected',callback)
any ideas please?