✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Consider the following code from the Plotly tutorial:
text_widget = widgets.HTML(description="Selection:", value="[]")fig = go.FigureWidget()fig.update_layout(width=700, height=500)scatter = go.Scatter(x=iris["petal_width"], y=iris["sepal_length"], mode="markers")fig.add_trace(scatter)def selection_function(trace, points, selector): inds = points.point_inds text_widget.value = str(inds)fig.data[-1].on_selection(selection_function)Which of the following statements are true?