1import plotly.express as px
2df = px.data.iris()
3fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
4 size='petal_length', hover_data=['petal_width'])
5fig.show()
1import plotly.graph_objects as go
2
3fig = go.Figure()
4
5# Add traces
6fig.add_trace(go.Scatter(x=df['col_x'], y=df['col_y'],
7 mode='markers',
8 name='markers'))
9fig.add_trace(go.Scatter(x=df2['col_x'], y=df2['col_y'],
10 mode='lines+markers',
11 name='lines+markers'))
12
13fig.show()