8000 Merge recent docs changes back to main by LiamConnors · Pull Request #5091 · plotly/plotly.py · GitHub
[go: up one dir, main page]

Skip to content

Merge recent docs changes back to main #5091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Mar 17, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor writing tweaks
  • Loading branch information
rl-utility-man authored Dec 23, 2024
commit 335695ca0e612f6aaeda11ed031b991b89ccb460
2 changes: 1 addition & 1 deletion doc/python/text-and-annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ fig.show()
```
### Specifying Source Lines or Figure Notes on the Bottom of a Figure

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.
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.

```import plotly.express as px
df_iris = px.data.iris()
Expand Down
0