Skip to content

Commit 6649511

Browse files
authored
Merge pull request matplotlib#24526 from oscargus/tutorialspelling
[Doc] Fix spelling and grammar in tutorials
2 parents 4fda5ff + 35771d3 commit 6649511

File tree

15 files changed

+43
-43
lines changed

15 files changed

+43
-43
lines changed

tutorials/advanced/blitting.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
.. warning::
4242
4343
This code does not work with the OSX backend (but does work with other
44-
GUI backends on mac).
44+
GUI backends on Mac).
4545
4646
Minimal example
4747
---------------
@@ -106,7 +106,7 @@
106106
# pixels changes (due to either the size or dpi of the figure
107107
# changing) , the background will be invalid and result in incorrect
108108
# (but sometimes cool looking!) images. There is also a global
109-
# variable and a fair amount of boiler plate which suggests we should
109+
# variable and a fair amount of boilerplate which suggests we should
110110
# wrap this in a class.
111111
#
112112
# Class-based example
@@ -125,7 +125,7 @@ def __init__(self, canvas, animated_artists=()):
125125
Parameters
126126
----------
127127
canvas : FigureCanvasAgg
128-
The canvas to work with, this only works for sub-classes of the Agg
128+
The canvas to work with, this only works for subclasses of the Agg
129129
canvas which have the `~FigureCanvasAgg.copy_from_bbox` and
130130
`~FigureCanvasAgg.restore_region` methods.
131131

tutorials/advanced/path_tutorial.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
the :class:`~matplotlib.path.Path`, which supports the standard set of
1010
moveto, lineto, curveto commands to draw simple and compound outlines
1111
consisting of line segments and splines. The ``Path`` is instantiated
12-
with a (N, 2) array of (x, y) vertices, and a N-length array of path
12+
with a (N, 2) array of (x, y) vertices, and an N-length array of path
1313
codes. For example to draw the unit rectangle from (0, 0) to (1, 1), we
1414
could use this code:
1515
"""
@@ -148,7 +148,7 @@
148148
# n, bins = np.histogram(data, 100)
149149
#
150150
# We'll now extract the corners of the rectangles. Each of the
151-
# ``left``, ``bottom``, etc, arrays below is ``len(n)``, where ``n`` is
151+
# ``left``, ``bottom``, etc., arrays below is ``len(n)``, where ``n`` is
152152
# the array of counts for each histogram bar::
153153
#
154154
# # get the corners of the rectangles for the histogram
@@ -161,7 +161,7 @@
161161
# series of ``MOVETO``, ``LINETO`` and ``CLOSEPOLY`` for each rectangle.
162162
# For each rectangle, we need five vertices: one for the ``MOVETO``,
163163
# three for the ``LINETO``, and one for the ``CLOSEPOLY``. As indicated
164-
# in the table above, the vertex for the closepoly is ignored but we still
164+
# in the table above, the vertex for the closepoly is ignored, but we still
165165
# need it to keep the codes aligned with the vertices::
166166
#
167167
# nverts = nrects*(1+3+1)

tutorials/advanced/transforms_tutorial.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
system, and the *display* coordinate system. In 95% of your plotting, you
1010
won't need to think about this, as it happens under the hood, but as you push
1111
the limits of custom figure generation, it helps to have an understanding of
12-
these objects so you can reuse the existing transformations Matplotlib makes
12+
these objects, so you can reuse the existing transformations Matplotlib makes
1313
available to you, or create your own (see :mod:`matplotlib.transforms`). The
1414
table below summarizes some useful coordinate systems, a description of each
1515
system, and the transformation object for going from each coordinate system to
@@ -91,7 +91,7 @@
9191
Note that specifying the position of Artists in *display* coordinates may
9292
change their relative location if the ``dpi`` or size of the figure changes.
9393
This can cause confusion when printing or changing screen resolution, because
94-
the object can change location and size. Therefore it is most common for
94+
the object can change location and size. Therefore, it is most common for
9595
artists placed in an Axes or figure to have their transform set to something
9696
*other* than the `~.transforms.IdentityTransform()`; the default when an artist
9797
is added to an Axes using `~.axes.Axes.add_artist` is for the transform to be
@@ -291,7 +291,7 @@
291291
# coordinates is extremely useful, for example to create a horizontal
292292
# span which highlights some region of the y-data but spans across the
293293
# x-axis regardless of the data limits, pan or zoom level, etc. In fact
294-
# these blended lines and spans are so useful, we have built in
294+
# these blended lines and spans are so useful, we have built-in
295295
# functions to make them easy to plot (see
296296
# :meth:`~matplotlib.axes.Axes.axhline`,
297297
# :meth:`~matplotlib.axes.Axes.axvline`,
@@ -430,7 +430,7 @@
430430
# Another use of :class:`~matplotlib.transforms.ScaledTranslation` is to create
431431
# a new transformation that is
432432
# offset from another transformation, e.g., to place one object shifted a
433-
# bit relative to another object. Typically you want the shift to be in
433+
# bit relative to another object. Typically, you want the shift to be in
434434
# some physical dimension, like points or inches rather than in *data*
435435
# coordinates, so that the shift effect is constant at different zoom
436436
# levels and dpi settings.

tutorials/colors/colormapnorms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
X, Y = np.mgrid[-3:3:complex(0, N), -2:2:complex(0, N)]
5454

5555
# A low hump with a spike coming out of the top right. Needs to have
56-
# z/colour axis on a log scale so we see both hump and spike. linear
56+
# z/colour axis on a log scale, so we see both hump and spike. A linear
5757
# scale only shows the spike.
5858
Z1 = np.exp(-X**2 - Y**2)
5959
Z2 = np.exp(-(X * 10)**2 - (Y * 10)**2)

tutorials/colors/colormaps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def plot_color_gradients(category, cmap_list):
285285
# https://stackoverflow.com/q/8202605/
286286

287287
if cmap_category == 'Sequential':
288-
# These colormaps all start at high lightness but we want them
288+
# These colormaps all start at high lightness, but we want them
289289
# reversed to look nice in the plot, so reverse the order.
290290
y_ = lab[0, ::-1, 0]
291291
c_ = x[::-1]

tutorials/intermediate/arranging_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
fig.suptitle('plt.subplots()')
112112

113113
##############################################################################
114-
# We will annotate a lot of Axes, so lets encapsulate the annotation, rather
114+
# We will annotate a lot of Axes, so let's encapsulate the annotation, rather
115115
# than having that large piece of annotation code every time we need it:
116116

117117

tutorials/intermediate/artists.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ class in the Matplotlib API, and the one you will be working with most
556556
# :attr:`~matplotlib.axes.Axes.yaxis`. The ``XAxis`` and ``YAxis``
557557
# containers will be detailed below, but note that the ``Axes`` contains
558558
# many helper methods which forward calls on to the
559-
# :class:`~matplotlib.axis.Axis` instances so you often do not need to
559+
# :class:`~matplotlib.axis.Axis` instances, so you often do not need to
560560
# work with them directly unless you want to. For example, you can set
561561
# the font color of the ``XAxis`` ticklabels using the ``Axes`` helper
562562
# method::

tutorials/intermediate/constrainedlayout_guide.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ def example_plot(ax, fontsize=12, hide_labels=False):
599599
# ======================
600600
#
601601
# The algorithm for the constraint is relatively straightforward, but
602-
# has some complexity due to the complex ways we can layout a figure.
602+
# has some complexity due to the complex ways we can lay out a figure.
603603
#
604604
# Layout in Matplotlib is carried out with gridspecs
605605
# via the `.GridSpec` class. A gridspec is a logical division of the figure
@@ -611,7 +611,7 @@ def example_plot(ax, fontsize=12, hide_labels=False):
611611
# for each column, and ``bottom`` and ``top`` variables for each row, and
612612
# further it has a margin for each of left, right, bottom and top. In each
613613
# row, the bottom/top margins are widened until all the decorators
614-
# in that row are accommodated. Similarly for columns and the left/right
614+
# in that row are accommodated. Similarly, for columns and the left/right
615615
# margins.
616616
#
617617
#

tutorials/intermediate/tight_layout_guide.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def example_plot(ax, fontsize=12):
161161
# are rare cases where it is not.
162162
#
163163
# * ``pad=0`` can clip some texts by a few pixels. This may be a bug or
164-
# a limitation of the current algorithm and it is not clear why it
164+
# a limitation of the current algorithm, and it is not clear why it
165165
# happens. Meanwhile, use of pad larger than 0.3 is recommended.
166166
#
167167
# Use with GridSpec
@@ -213,7 +213,7 @@ def example_plot(ax, fontsize=12):
213213
# =======================
214214
#
215215
# Pre Matplotlib 2.2, legends and annotations were excluded from the bounding
216-
# box calculations that decide the layout. Subsequently these artists were
216+
# box calculations that decide the layout. Subsequently, these artists were
217217
# added to the calculation, but sometimes it is undesirable to include them.
218218
# For instance in this case it might be good to have the axes shrink a bit
219219
# to make room for the legend:

tutorials/introductory/lifecycle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
3737
* The `.Figure` is the final image, and may contain one or more `~.axes.Axes`.
3838
* The `~.axes.Axes` represents an individual plot (not to be confused with
39-
`~.axis.Axis`, which refers to the x/y axis of a plot).
39+
`~.axis.Axis`, which refers to the x-, y-, or z-axis of a plot).
4040
4141
We call methods that do the plotting directly from the Axes, which gives
4242
us much more flexibility and power in customizing our plot.

0 commit comments

Comments
 (0)