Closed
Description
The select_traces
function fetches all traces when using selector=0
.
The bug is at https://github.com/plotly/plotly.py/blob/master/packages/python/plotly/plotly/basedatatypes.py#L1144 where the selector is overwritten by an empty dict in this case.
A minimum code snippet is:
fig = go.Figure()
fig.add_trace(go.Scatter(x=[0, 1], y=[0, 1], name="trace0"))
fig.add_trace(go.Scatter(x=[0, 1], y=[0, 1], name="trace1"))
for trace in fig.select_traces(selector=0):
print(trace["name"])
for trace in fig.select_traces(selector=1):
print(trace["name"])
The output is:
trace0
trace1
trace1
Metadata
Metadata
Assignees
Labels
No labels