Select Tool on Scatter Plot

Ironically using a link_selections object on a single plot isn’t much longer in terms of code:

df = pd.DataFrame(np.random.randn(50,2))

scatter = hv.Scatter(df.values)
ls = hv.link_selections.instance()
ls(scatter)

Then select values:

ls.filter(df)

There are two advantages with this:

  1. ls doesn’t start out with an empty list
  2. You don’t need to explicitely add the lasso_select and box_select tool.
2 Likes