Skip to content

Commit 335695c

Browse files
minor writing tweaks
1 parent f978ef6 commit 335695c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/python/text-and-annotations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ fig.show()
784784
```
785785
### Specifying Source Lines or Figure Notes on the Bottom of a Figure
786786

787-
Sometimes we need to include information about the data source or notes about interpreting the data at the bottom of the figure. This example achieves the desired alignment in the bottom right corner using the title element and container coordinates and uses an annotation for the title. A near zero container coordinate is an easy and robust way to put text -- such as a source line or figure note -- at the bottom of a figure. It is easier to specify the bottom of the figure in container coordinates than in e.g. a paper coordinate since it is unclear how big legends and x-axis labels will be which makes it unclear what paper coordinates to use. Making the y container coordinate of the note very slightly positive avoids cutting off the descending strokes of letters like y, p, and q. Only the title command supports container coordinates, so this example repurposes the title element to insert the note and repurposes an annotation element for the title. The top of the figure is typically less cluttered and more predictable, so an annotation with a paper y-coordinate slightly greater than 1 will generally be a reasonable title location above the plot area.
787+
Sometimes we need to include information at the bottom of the figure about the data source or interpretation. This example achieves the desired alignment in the bottom right corner using the title element and container coordinates and then uses an annotation for the title. A near zero container coordinate is an easy and robust way to put text -- such as a source line or figure note -- at the bottom of a figure. It is easier to specify the bottom of the figure in container coordinates than in e.g. a paper coordinate since uncertainty about the size of legends and x-axis labels make the paper coordinate of the bottom of the figure uncertain. Making the y container coordinate very slightly positive avoids cutting off the descending strokes of letters like y, p, and q. Only the title command supports container coordinates, so this example repurposes the title element to insert the note and repurposes an annotation element for the title. The top of the figure is typically less cluttered and more predictable, so an annotation with its bottom at a paper y-coordinate slightly greater than 1 is a reasonable title location on many graphs.
788788

789789
```import plotly.express as px
790790
df_iris = px.data.iris()

0 commit comments

Comments
 (0)