Skip to content

Commit 0281146

Browse files
WenjieZemmanuelle
authored andcommitted
Add some comments about the configuration of the legend (#2032)
* Remove "Legend Entries" in the title Remove "Legend Entries" in the title since it is already in an individual page. * Add some comments in figure-labels.md
1 parent 91efa11 commit 0281146

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/python/figure-labels.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fig = go.Figure()
4242
fig.add_trace(go.Scatter(
4343
x=[0, 1, 2, 3, 4, 5, 6, 7, 8],
4444
y=[0, 1, 2, 3, 4, 5, 6, 7, 8],
45-
name="Name of Trace 1"
45+
name="Name of Trace 1" # this sets its legend entry
4646
))
4747

4848

@@ -66,6 +66,8 @@ fig.update_layout(
6666
fig.show()
6767
```
6868

69+
The configuration of the legend is discussed in detail in the [Legends](/python/legend/) page.
70+
6971
### Align Plot Title
7072
The following example shows how to align the plot title in [layout.title](https://plot.ly/python/reference/#layout-title). `x` sets the x position with respect to `xref` from "0" (left) to "1" (right), and `y` sets the y position with respect to `yref` from "0" (bottom) to "1" (top). Moreover, you can define `xanchor` to `left`,`right`, or `center` for setting the title's horizontal alignment with respect to its x position, and/or `yanchor` to `top`, `bottom`, or `middle` for setting the title's vertical alignment with respect to its y position.
7173

0 commit comments

Comments
 (0)