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/legend.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -346,7 +346,7 @@ fig.show()
346
346
347
347
#### Grouped Legend Items
348
348
349
-
Grouping legend items together by setting the `legendgroup` attribute of traces causes their legend entries to be next to each other, and clicking on any legend entry in the group will show or hide the whole group.
349
+
Grouping legend items together by setting the `legendgroup` attribute of traces causes their legend entries to be next to each other, and clicking on any legend entry in the group will show or hide the whole group. The `legendgrouptitle` attribute can be used to give titles to groups.
350
350
351
351
```python
352
352
import plotly.graph_objects as go
@@ -357,6 +357,7 @@ fig.add_trace(go.Scatter(
357
357
x=[1, 2, 3],
358
358
y=[2, 1, 3],
359
359
legendgroup="group", # this can be any string, not just "group"
0 commit comments