Skip to content

Commit d79add7

Browse files
committed
remove duplicate example
1 parent 598f214 commit d79add7

File tree

1 file changed

+3
-34
lines changed

1 file changed

+3
-34
lines changed

doc/python/axes.md

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.3'
9-
jupytext_version: 1.14.1
9+
jupytext_version: 1.14.7
1010
kernelspec:
11-
display_name: Python 3
11+
display_name: Python 3 (ipykernel)
1212
language: python
1313
name: python3
1414
language_info:
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.8.8
23+
version: 3.10.4
2424
plotly:
2525
description: How to adjust axes properties in Python - axes titles, styling and
2626
coloring axes and grid lines, ticks, tick labels and more.
@@ -658,37 +658,6 @@ fig.update_yaxes(
658658
)
659659

660660

661-
fig.show()
662-
```
663-
664-
### Fixed Ratio Axes with Compressed ___domain
665-
666-
If an axis needs to be compressed (either due to its own `scaleanchor` and `scaleratio` or those of the other axis), `constrain` determines how that happens: by increasing the "range" (default), or by decreasing the "___domain".
667-
668-
```python
669-
import plotly.graph_objects as go
670-
671-
fig = go.Figure()
672-
673-
fig.add_trace(go.Scatter(
674-
x = [0,1,1,0,0,1,1,2,2,3,3,2,2,3],
675-
y = [0,0,1,1,3,3,2,2,3,3,1,1,0,0]
676-
))
677-
678-
fig.update_layout(
679-
width = 800,
680-
height = 500,
681-
title = "fixed-ratio axes with compressed axes"
682-
)
683-
fig.update_xaxes(
684-
range=[-1,4], # sets the range of xaxis
685-
constrain="___domain", # meanwhile compresses the xaxis by decreasing its "___domain"
686-
)
687-
fig.update_yaxes(
688-
scaleanchor = "x",
689-
scaleratio = 1,
690-
)
691-
692661
fig.show()
693662
```
694663

0 commit comments

Comments
 (0)