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 ea1cca5

Browse filesBrowse files
tacaswellMeeseeksDev[bot]
authored andcommitted
Backport PR #14210: Make intro tutorial less jargony.
1 parent 08b7f88 commit ea1cca5
Copy full SHA for ea1cca5

File tree

Expand file treeCollapse file tree

1 file changed

+9
-15
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-15
lines changed

‎tutorials/introductory/usage.py

Copy file name to clipboardExpand all lines: tutorials/introductory/usage.py
+9-15Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,15 @@
149149
# Matplotlib, pyplot and pylab: how are they related?
150150
# ====================================================
151151
#
152-
# Matplotlib is the whole package; :mod:`matplotlib.pyplot`
153-
# is a module in matplotlib; and :mod:`pylab` is a module
154-
# that gets installed alongside :mod:`matplotlib`.
152+
# Matplotlib is the whole package and :mod:`matplotlib.pyplot` is a module in
153+
# Matplotlib.
155154
#
156-
# Pyplot provides the state-machine interface to the underlying
157-
# object-oriented plotting library. The state-machine implicitly and
158-
# automatically creates figures and axes to achieve the desired
159-
# plot. For example:
155+
# For functions in the pyplot module, there is always a "current" figure and
156+
# axes (which is created automatically on request). For example, in the
157+
# following example, the first call to ``plt.plot`` creates the axes, then
158+
# subsequent calls to ``plt.plot`` add additional lines on the same axes, and
159+
# ``plt.xlabel``, ``plt.ylabel``, ``plt.title`` and ``plt.legend`` set the
160+
# axes labels and title and add a legend.
160161

161162
x = np.linspace(0, 2, 100)
162163

@@ -174,16 +175,9 @@
174175
plt.show()
175176

176177
###############################################################################
177-
# The first call to ``plt.plot`` will automatically create the necessary
178-
# figure and axes to achieve the desired plot. Subsequent calls to
179-
# ``plt.plot`` re-use the current axes and each add another line.
180-
# Setting the title, legend, and axis labels also automatically use the
181-
# current axes and set the title, create the legend, and label the axis
182-
# respectively.
183-
#
184178
# :mod:`pylab` is a convenience module that bulk imports
185179
# :mod:`matplotlib.pyplot` (for plotting) and :mod:`numpy`
186-
# (for mathematics and working with arrays) in a single name space.
180+
# (for mathematics and working with arrays) in a single namespace.
187181
# pylab is deprecated and its use is strongly discouraged because
188182
# of namespace pollution. Use pyplot instead.
189183
#

0 commit comments

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