添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Greetings,

I am using a code like the following to add drawing instruments to my modebar:

import plotly.graph_objects as go
import plotly.express as px
df = px.data.iris()
fig = px.scatter(df, x='petal_width', y='sepal_length', color='species')
fig.update_layout(
    dragmode='drawopenpath',
    newshape_line_color='cyan',
    title_text='Draw a path to separate versicolor and virginica',
    modebar_add=['drawline',
        'drawopenpath',
        'drawclosedpath',
        'drawcircle',
        'drawrect',
        'eraseshape'

I can use lasso or box select to select data in mu y chart:

Once I select, what can I do with the selection?

Is there any Python code sample to get a call back to at leas have the selected data in a NumPy array or Python list? Is that the intention of the selection tools in the toolbar?

Thank youm