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

Skip to content

Commit 5dfbb7d

Browse files
committed
Basic usage tutorial: Revert terminology and spelling changes
regarding implicit/explicit and pyplot/object oriented style
1 parent 0caa41a commit 5dfbb7d

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

tutorials/introductory/usage.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -131,22 +131,21 @@
131131
# Coding styles
132132
# =============
133133
#
134-
# The explicit and the implicit approach of programming
135-
# -----------------------------------------------------
134+
# The object-oriented and the pyplot interfaces
135+
# ---------------------------------------------
136136
#
137137
# As noted above, there are essentially two ways to use Matplotlib:
138138
#
139-
# - Explicitly create Figures and Axes, and call methods on them (the explicit
140-
# or "object oriented programming (OOP) style").
139+
# - Explicitly create Figures and Axes, and call methods on them (the
140+
# "object-oriented (OO) style").
141141
# - Rely on pyplot to automatically create and manage the Figures and Axes, and
142-
# use pyplot functions for plotting (the implicit style).
142+
# use pyplot functions for plotting.
143143
#
144-
# So one can use the explicit style
144+
# So one can use the OO-style
145145

146146
x = np.linspace(0, 2, 100) # Sample data.
147147

148-
# Note that even in the explicit style, we use `.pyplot.figure` to create the
149-
# Figure.
148+
# Note that even in the OO-style, we use `.pyplot.figure` to create the Figure.
150149
fig, ax = plt.subplots(figsize=(5, 2.7), layout='constrained')
151150
ax.plot(x, x, label='linear') # Plot some data on the axes.
152151
ax.plot(x, x**2, label='quadratic') # Plot more data on the axes...
@@ -157,7 +156,7 @@
157156
ax.legend(); # Add a legend.
158157

159158
###############################################################################
160-
# or the implicit style:
159+
# or the pyplot-style:
161160

162161
x = np.linspace(0, 2, 100) # Sample data.
163162

@@ -176,11 +175,11 @@
176175
# figure creation. See the corresponding section in the gallery for more info:
177176
# :ref:`user_interfaces`.)
178177
#
179-
# Matplotlib's documentation and examples use both the explicit and the
180-
# implicit styles. In general, we suggest using the explicit style,
181-
# particularly for complicated plots, and functions and scripts that are
182-
# intended to be reused as part of a larger project. However, the implicit
183-
# style can be very convenient for quick interactive work.
178+
# Matplotlib's documentation and examples use both the OO and the pyplot
179+
# styles. In general, we suggest using the OO style, particularly for
180+
# complicated plots, and functions and scripts that are intended to be reused
181+
# as part of a larger project. However, the pyplot style can be very convenient
182+
# for quick interactive work.
184183
#
185184
# .. note::
186185
#

0 commit comments

Comments
 (0)