Skip to content

Commit

Permalink
Merge pull request matplotlib#29246 from meeseeksmachine/auto-backpor…
Browse files Browse the repository at this point in the history
…t-of-pr-29240-on-v3.10.x

Backport PR matplotlib#29240 on branch v3.10.x (DOC: Add plt.show() to introductory pyplot example)
  • Loading branch information
QuLogic authored Dec 6, 2024
2 parents 8f296ab + c1a7e20 commit 017213e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
x = np.arange(0, 5, 0.1)
y = np.sin(x)
plt.plot(x, y)
plt.show()
The explicit object-oriented API is recommended for complex plots, though
pyplot is still usually used to create the figure and often the Axes in the
Expand All @@ -29,6 +30,7 @@
y = np.sin(x)
fig, ax = plt.subplots()
ax.plot(x, y)
plt.show()
See :ref:`api_interfaces` for an explanation of the tradeoffs between the
Expand Down

0 comments on commit 017213e

Please sign in to comment.