8000 Documentation for 5.10 features by LiamConnors · Pull Request #3818 · plotly/plotly.py · GitHub
[go: up one dir, main page]

Skip to content

Documentation for 5.10 features #3818

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 35 commits into from
Jul 26, 2022
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a8ae4ab
Update parallel-coordinates-plot.md
LiamConnors Jul 19, 2022
7f97ac2
Adding a prefix and suffix
LiamConnors Jul 19, 2022
7ff8954
Create selections.md
LiamConnors Jul 19, 2022
cfcf5f5
Update link
LiamConnors Jul 19, 2022
16880be
add methods to calculate quartiles
LiamConnors Jul 19, 2022
540d9d9
Update violin.md
LiamConnors Jul 19, 2022
600bf7a
Update setting-graph-size.md
LiamConnors Jul 19, 2022
11347f2
minor edits
LiamConnors Jul 19, 2022
15afc11
Update indicator.md
LiamConnors Jul 19, 2022
b47c824
Update indicator.md
LiamConnors Jul 19, 2022
e8d9959
minor edits
LiamConnors Jul 19, 2022
8741c88
Update setting-graph-size.md
LiamConnors Jul 19, 2022
5627314
Update doc/python/selections.md
LiamConnors Jul 21, 2022
ae737ac
Update doc/python/selections.md
LiamConnors Jul 21, 2022
b5fa284
Update parallel-coordinates-plot.md
LiamConnors Jul 21, 2022
c5bf5df
Update parallel-coordinates-plot.md
LiamConnors Jul 21, 2022
3682408
Update selections.md
LiamConnors Jul 21, 2022
e955334
Update selections.md
LiamConnors Jul 21, 2022
186dec4
Update doc/python/selections.md
LiamConnors Jul 21, 2022
6d1a2da
Update selections.md
LiamConnors Jul 21, 2022
e2eb238
add time series example
8000 LiamConnors Jul 21, 2022
cb07e20
Update selections.md
LiamConnors Jul 21, 2022
0e536e9
Update selections.md
LiamConnors Jul 21, 2022
fbc1668
Update selections.md
LiamConnors Jul 21, 2022
a8c5649
Update doc/python/selections.md
LiamConnors Jul 22, 2022
263a9b8
add random seed
LiamConnors Jul 22, 2022
9e66af4
Update doc/python/selections.md
LiamConnors Jul 22, 2022
222b3b2
Update selections.md
LiamConnors Jul 22, 2022
b705619
Update doc/python/selections.md
LiamConnors Jul 22, 2022
1d753ed
Update selections.md
LiamConnors Jul 22, 2022
fa2f3f4
Update selections.md
LiamConnors Jul 22, 2022
c674802
Update selections.md
LiamConnors Jul 22, 2022
51e599e
Update selections.md
LiamConnors Jul 22, 2022
66443e1
Merge branch 'master' into docs-5-10
LiamConnors Jul 26, 2022
9417bcb
Update doc/python/selections.md
LiamConnors Jul 26, 2022
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
8000
Prev Previous commit
Next Next commit
Update setting-graph-size.md
  • Loading branch information
LiamConnors committed Jul 19, 2022
commit 600bf7a478062aac5236752baf81f3a3df7d8afc
40 changes: 36 additions & 4 deletions doc/python/setting-graph-size.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ jupyter:
text_representation:
extension: .md
format_name: markdown
format_version: '1.2'
jupytext_version: 1.6.0
format_version: '1.3'
jupytext_version: 1.13.7
kernelspec:
display_name: Python 3
display_name: Python 3 (ipykernel)
language: python
name: python3
language_info:
Expand All @@ -20,7 +20,7 @@ jupyter:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.7.6
version: 3.9.0
plotly:
description: How to manipulate the graph size, margins and background color.
display_as: file_settings
Expand Down Expand Up @@ -127,6 +127,38 @@ fig.update_yaxes(automargin=True)
fig.show()
```

### Automatically Adjust Specific Margins
You can also set auto-margin for specific sides of the figure. Here, we set `automargin` on the `left` and `top` of the figure.

```python
import plotly.graph_objects as go


fig = go.Figure()

fig.add_trace(go.Bar(
x=["Apples", "Oranges", "Watermelon", "Pears"],
y=[3, 2, 1, 4]
))

fig.update_layout(
autosize=False,
width=500,
height=500,
yaxis=dict(
title_text="Y-axis Title",
ticktext=["Very long label", "long label", "3", "label"],
tickvals=[1, 2, 3, 4],
tickmode="array",
titlefont=dict(size=30),
)
)

fig.update_yaxes(automargin='left+top')

fig.show()
```

#### Reference

See https://plotly.com/python/reference/layout/ for more information and chart attribute options!
0