From 85ee0dc5102a27e10fe3e31ec3322e5e0c8d922e Mon Sep 17 00:00:00 2001 From: Wenjie Zheng Date: Sun, 5 Jan 2020 11:09:31 +0800 Subject: [PATCH 1/2] Remove "Legend Entries" in the title Remove "Legend Entries" in the title since it is already in an individual page. --- doc/python/figure-labels.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/python/figure-labels.md b/doc/python/figure-labels.md index eca9dad8cbe..dad8a0f7e0c 100644 --- a/doc/python/figure-labels.md +++ b/doc/python/figure-labels.md @@ -22,12 +22,12 @@ jupyter: pygments_lexer: ipython3 version: 3.7.3 plotly: - description: How to set the global font, title, legend-entries, and axis-titles + description: How to set the global font, title, and axis-titles in python. display_as: file_settings language: python layout: base - name: Setting the Font, Title, Legend Entries, and Axis Titles + name: Setting the Font, Title, and Axis Titles order: 12 permalink: python/figure-labels/ redirect_from: python/font/ From aaf1db05f24f9ba2d33e0aeb7cd080e7bc2ca3b6 Mon Sep 17 00:00:00 2001 From: Wenjie Zheng Date: Mon, 6 Jan 2020 16:34:57 +0800 Subject: [PATCH 2/2] Add some comments in figure-labels.md --- doc/python/figure-labels.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/python/figure-labels.md b/doc/python/figure-labels.md index dad8a0f7e0c..0d879357bab 100644 --- a/doc/python/figure-labels.md +++ b/doc/python/figure-labels.md @@ -22,12 +22,12 @@ jupyter: pygments_lexer: ipython3 version: 3.7.3 plotly: - description: How to set the global font, title, and axis-titles + description: How to set the global font, title, legend-entries, and axis-titles in python. display_as: file_settings language: python layout: base - name: Setting the Font, Title, and Axis Titles + name: Setting the Font, Title, Legend Entries, and Axis Titles order: 12 permalink: python/figure-labels/ redirect_from: python/font/ @@ -42,7 +42,7 @@ fig = go.Figure() fig.add_trace(go.Scatter( x=[0, 1, 2, 3, 4, 5, 6, 7, 8], y=[0, 1, 2, 3, 4, 5, 6, 7, 8], - name="Name of Trace 1" + name="Name of Trace 1" # this sets its legend entry )) @@ -66,6 +66,8 @@ fig.update_layout( fig.show() ``` +The configuration of the legend is discussed in detail in the [Legends](/python/legend/) page. + ### Align Plot Title 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.