Scatter3d.on_click doesn't receive InputDeviceState object
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- jupyter-notebook, python
- Domain
- data-visualization
Research direction
Start with the supplied Python FigureWidget example and the f.data[0].on_click(callback) entry point; reproduce the click in a notebook and trace how points and selector are passed to callback. Done means Scatter3d.on_click supplies the reported InputDeviceState object rather than leaving selector as None.
Written by the indexing model from the issue text.
Description
Here is the code:
import plotly.graph_objects as go
import numpy as np
import ipywidgets
np.random.seed(1)
scatter_1 = go.Scatter3d(x=np.random.rand(100), y=np.random.rand(100), z=np.random.rand(100), mode='markers', marker={"size":2},)
f = go.FigureWidget()
f.add_trace(scatter_1)
o = ipywidgets.Output()
@o.capture(clear_output=True)
def callback(trace, points, selector):
print(points)
print(selector)
f.data[0].on_click(callback)
ipywidgets.HBox([f, o])
click on any point, and the output is as following, the selector argument is None:
Points(point_inds=[69],
xs=[0.5865550405019929],
ys=[0.5688514370864813],
trace_name='trace 0',
trace_index=0)
None
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plotly/plotly.py
-
P3 size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug P1
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
feature P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
feature P3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in plotly/plotly.py
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100