Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d23af0d

Browse filesBrowse files
committed
Fix subplot docstring to show current behavior
1 parent bc68ad1 commit d23af0d
Copy full SHA for d23af0d

File tree

1 file changed

+2
-4
lines changed
Filter options

1 file changed

+2
-4
lines changed

‎lib/matplotlib/pyplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,15 +1450,13 @@ def subplot(*args, **kwargs) -> Axes:
14501450
14511451
Notes
14521452
-----
1453-
Creating a new Axes will delete any preexisting Axes that
1454-
overlaps with it beyond sharing a boundary::
1453+
Creating a new Axes will not delete any preexisting Axes, even if they overlap::
14551454
14561455
import matplotlib.pyplot as plt
14571456
# plot a line, implicitly creating a subplot(111)
14581457
plt.plot([1, 2, 3])
14591458
# now create a subplot which represents the top plot of a grid
1460-
# with 2 rows and 1 column. Since this subplot will overlap the
1461-
# first, the plot (and its Axes) previously created, will be removed
1459+
# with 2 rows and 1 column. The existing plot (and its Axes) will remain
14621460
plt.subplot(211)
14631461
14641462
If you do not want this behavior, use the `.Figure.add_subplot` method

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.