How To Plot Discrete Colours With Plotly
My code so far: fig2 = plotly.subplots.make_subplots(rows=3, cols=1, shared_xaxes=True) fig2.append_trace( go.Scatter(x=df['Date_Time'], y=df['N2O_rSig']), row=1, col=1)
Solution 1:
So after a bit of looking around I found a direct comparison with bar graphs on the plotly website
The following code allowed me to split up my Data Frame based on Valve and then iterate through each DF to create individual traces.
for valve, groupin df.groupby("Valve_ai"):
fig.add_trace(go.Scatter(x=group["Date_Time"], y=group["N2O_rSig"], name=valve)
Post a Comment for "How To Plot Discrete Colours With Plotly"