plotly go line plot color code example
Example 1: go.scatter
import plotly.graph_objects as go
fig = go.Figure()
# Add traces
fig.add_trace(go.Scatter(x=df['col_x'], y=df['col_y'],
mode='markers',
name='markers'))
fig.add_trace(go.Scatter(x=df2['col_x'], y=df2['col_y'],
mode='lines+markers',
name='lines+markers'))
fig.show()
Example 2: plotly line plot
import plotly.express as px
df = px.data.gapminder().query("continent=='Oceania'")
fig = px.line(df, x="year", y="lifeExp", color='country')
fig.show()