-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
At the moment if you want to add several traces to the same subplot you have to pass an iterable to the rows
and cols
arguments of fig.add_traces
.
import plotly.express as px
df = px.data.tips()
fig = px.scatter(df, x='total_bill', y='tip', color='day')
from plotly.subplots import make_subplots
fig2 = make_subplots(1, 2)
fig2.add_traces(fig.data, rows=[1,]*len(fig.data), cols=[1,]*len(fig.data))
fig2.show()
We could also accept an int here, in which case all traces would be added to the same subplot.
Metadata
Metadata
Assignees
Labels
No labels