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

Skip to content

Commit e125ffb

Browse files
authored
Merge pull request #18975 from zhqu1148980644/patch-2
Fix typing error in pyplot's docs
2 parents c486cd7 + 72d3152 commit e125ffb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/pyplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,8 +1315,8 @@ def subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True,
13151315
fig, axs = plt.subplots(2, 2)
13161316
13171317
# using tuple unpacking for multiple Axes
1318-
fig, (ax1, ax2) = plt.subplot(1, 2)
1319-
fig, ((ax1, ax2), (ax3, ax4)) = plt.subplot(2, 2)
1318+
fig, (ax1, ax2) = plt.subplots(1, 2)
1319+
fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2)
13201320
13211321
The names ``ax`` and pluralized ``axs`` are preferred over ``axes``
13221322
because for the latter it's not clear if it refers to a single

0 commit comments

Comments
 (0)