Skip to content

Commit 5d44a09

Browse files
Update axes.md
Section `Zooming subplots to the same range` updated accordingly to the analogous section in facet-plots.md
1 parent 6b0ca58 commit 5d44a09

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: doc/python/axes.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -741,9 +741,11 @@ fig.update_yaxes(domain=(0.25, 0.75))
741741
fig.show()
742742
```
743743

744-
### Zooming subplots to the same range
744+
#### Synchronizing axes in subplots with `matches`
745745

746-
Using `facet_col` from `plotly.express` let zoom each facet to the same range impliciltly. However, if the subplots are created with `make_subplots`, the axis needs to be updated with `matches` parameter, to zoom all the subplots accordingly. Zoom in one trace below, to see the other subplots zoomed to the same x-axis range:
746+
Using `facet_col` from `plotly.express` let [zoom](https://help.plot.ly/zoom-pan-hover-controls/#step-3-zoom-in-and-zoom-out-autoscale-the-plot) and [pan](https://help.plot.ly/zoom-pan-hover-controls/#step-6-pan-along-axes) each facet to the same range implicitly. However, if the subplots are created with `make_subplots`, the axis needs to be updated with `matches` parameter to update all the subplots accordingly.
747+
748+
Zoom in one trace below, to see the other subplots zoomed to the same x-axis range. To pan all the subplots, click and drag from the center of x-axis to the side:
747749

748750
```python
749751
import plotly.graph_objects as go
@@ -754,10 +756,8 @@ N = 20
754756
x = np.linspace(0, 1, N)
755757

756758
fig = make_subplots(1, 3)
757-
758759
for i in range(1, 4):
759760
fig.add_trace(go.Scatter(x=x, y=np.random.random(N)), 1, i)
760-
761761
fig.update_xaxes(matches='x')
762762
fig.show()
763763
```

0 commit comments

Comments
 (0)