Skip to content

Commit 8ce515f

Browse files
committed
Update marker-style.md
1 parent e9fbfd8 commit 8ce515f

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

doc/python/marker-style.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,26 @@ Set `dash` on `marker.line` to control the dash pattern of marker borders. Suppo
116116
```python
117117
import plotly.graph_objects as go
118118

119-
styles = ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot", "12px,6px"]
119+
fig = go.Figure(go.Scatter(
120+
x=[1, 2, 3, 4, 5],
121+
y=[2, 4, 3, 5, 4],
122+
mode="markers",
123+
marker=dict(
124+
size=25,
125+
color="white",
126+
line=dict(width=2, color="blue", dash="dot")
127+
)
128+
))
129+
130+
fig.show()
131+
```
132+
133+
You can also pass an array of dash styles to set different styles per marker:
134+
135+
```python
136+
import plotly.graph_objects as go
137+
138+
styles = ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"]
120139

121140
fig = go.Figure(go.Scatter(
122141
x=list(range(len(styles))),

0 commit comments

Comments
 (0)