Reputation: 1521
I would like to specify dotted linetype in scatter plot of plotly
import plotly.graph_objs as go
go.Scatter(
x=df['x']
y=df['y'],
mode="lines+markers",
marker=dict(size=7, color=color, symbol='circle-open'),
fillcolor=color,
name=f'{study[exp_names[i]]}_exp'
),
I could specify "lines+markers" in mode. But not sure how to specify the linetype.
Suggestions will be really helpful.
Upvotes: 0
Views: 5675
Reputation: 19590
You can pass the argument line=dict(dash='dot')
to go.Scatter
(as shown in the documentation here):
go.Scatter(
x=df['x']
y=df['y'],
mode="lines+markers",
marker=dict(size=7, color=color, symbol='circle-open'),
line=dict(dash='dot'),
fillcolor=color,
name=f'{study[exp_names[i]]}_exp'
),
Upvotes: 2