Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 46a2e97

Browse files
committed
DOC: organize explain section
1 parent 7b3129a commit 46a2e97

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

doc/users/explain/layout/index.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
########################################
3+
Arranging and laying out Axes (subplots)
4+
########################################
5+
6+
.. plot::
7+
8+
import matplotlib.pyplot as plt
9+
import numpy as np
10+
11+
fig, axs = plt.subplots(ncols=2, nrows=2, figsize=(3.5, 2.5),
12+
layout="constrained")
13+
# add an artist, in this case a nice label in the middle...
14+
for row in range(2):
15+
for col in range(2):
16+
axs[row, col].annotate(f'axs[{row}, {col}]', (0.5, 0.5),
17+
transform=axs[row, col].transAxes,
18+
ha='center', va='center', fontsize=18,
19+
color='darkgrey')
20+
fig.suptitle('plt.subplots()')
21+
22+
23+
.. toctree::
24+
:maxdepth: 1
25+
26+
../../../tutorials/intermediate/arranging_axes.rst
27+
../../../gallery/subplots_axes_and_figures/colorbar_placement.rst
28+
../../../tutorials/intermediate/constrainedlayout_guide.rst
29+
../../../tutorials/intermediate/tight_layout_guide.rst
30+

0 commit comments

Comments
 (0)