You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/python/marker-style.md
+45-2Lines changed: 45 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ jupyter:
6
6
extension: .md
7
7
format_name: markdown
8
8
format_version: '1.3'
9
-
jupytext_version: 1.14.6
9
+
jupytext_version: 1.19.1
10
10
kernelspec:
11
11
display_name: Python 3 (ipykernel)
12
12
language: python
@@ -20,7 +20,7 @@ jupyter:
20
20
name: python
21
21
nbconvert_exporter: python
22
22
pygments_lexer: ipython3
23
-
version: 3.10.11
23
+
version: 3.14.3
24
24
plotly:
25
25
description: How to style markers in Python with Plotly.
26
26
display_as: file_settings
@@ -107,6 +107,49 @@ fig.show()
107
107
108
108
Fully opaque, the default setting, is useful for non-overlapping markers. When many points overlap it can be hard to observe density.
109
109
110
+
### Dashed Marker Borders
111
+
112
+
*New in 6.6*
113
+
114
+
Set `dash` on `marker.line` to control the dash pattern of marker borders. Supported values are: `'solid'` (default), `'dot'`, `'dash'`, `'longdash'`, `'dashdot'`, `'longdashdot'`, or a custom dash length list in px (for example, `'12px,6px'`).
115
+
116
+
```python
117
+
import plotly.graph_objects as go
118
+
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:
The `marker.line.dash` attribute is available on `go.Scatter`, `go.Scatterpolar`, `go.Scattergeo`, `go.Scatterternary`, `go.Scattercarpet`, and `go.Scattersmith` traces.
Copy file name to clipboardExpand all lines: doc/python/shapes.md
+61-2Lines changed: 61 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ jupyter:
6
6
extension: .md
7
7
format_name: markdown
8
8
format_version: '1.3'
9
-
jupytext_version: 1.16.3
9
+
jupytext_version: 1.19.1
10
10
kernelspec:
11
11
display_name: Python 3 (ipykernel)
12
12
language: python
@@ -20,7 +20,7 @@ jupyter:
20
20
name: python
21
21
nbconvert_exporter: python
22
22
pygments_lexer: ipython3
23
-
version: 3.10.14
23
+
version: 3.14.3
24
24
plotly:
25
25
description: How to make SVG shapes in python. Examples of lines, circle, rectangle,
26
26
and path.
@@ -488,6 +488,65 @@ fig.update_layout(
488
488
fig.show()
489
489
```
490
490
491
+
#### Subplot-Spanning Shapes
492
+
493
+
*New in 6.6*
494
+
495
+
You can create shapes that span multiple subplots by passing an array of axis references to `xref` and `yref`. Each element in the array specifies which axis the corresponding coordinate refers to. For example, in the following code, with `xref=["x", "x2"]`, `x0` refers to the `x` axis and `x1` refers to the `x2` axis.
xref=["x", "x2"], # x0 uses the x-axis from subplot 1 ("x"), while x1 uses the x-axis from subplot 2 ("x2")
509
+
yref=["y", "y2"], # y0 uses the y-axis from subplot 1 ("y"), while y1 uses the y-axis from subplot 2 ("y2")
510
+
x0=2, y0=4.5,
511
+
x1=3, y1=5.5,
512
+
fillcolor="rgba(255, 0, 0, 0.2)",
513
+
line=dict(color="red", width=2),
514
+
)
515
+
516
+
fig.show()
517
+
```
518
+
519
+
For `path` shapes, the array must have one entry for each coordinate in the path string. Each coordinate in the path maps to the corresponding element in the `xref`/`yref` array, in order.
0 commit comments