Skip to content

Commit e4e140b

Browse files
committed
[Doc] Fix spelling and grammar in examples
1 parent d9a3c2b commit e4e140b

File tree

66 files changed

+139
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+139
-141
lines changed

examples/axes_grid1/demo_axes_divider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
============
3-
Axes Divider
3+
Axes divider
44
============
55
66
Axes divider to calculate location of axes and
@@ -112,7 +112,7 @@ def demo():
112112

113113
# PLOT 3
114114
# image and colorbar whose location is adjusted in the drawing time.
115-
# a easy way
115+
# an easy way
116116

117117
ax = fig.add_subplot(2, 2, 3)
118118
demo_locatable_axes_easy(ax)

examples/axes_grid1/inset_locator_demo.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
==================
3-
Inset Locator Demo
3+
Inset locator demo
44
==================
55
66
"""
@@ -45,7 +45,7 @@
4545

4646
###############################################################################
4747
# The parameters *bbox_to_anchor* and *bbox_transform* can be used for a more
48-
# fine grained control over the inset position and size or even to position
48+
# fine-grained control over the inset position and size or even to position
4949
# the inset at completely arbitrary positions.
5050
# The *bbox_to_anchor* sets the bounding box in coordinates according to the
5151
# *bbox_transform*.
@@ -54,12 +54,12 @@
5454
fig = plt.figure(figsize=[5.5, 2.8])
5555
ax = fig.add_subplot(121)
5656

57-
# We use the axes transform as bbox_transform. Therefore the bounding box
57+
# We use the axes transform as bbox_transform. Therefore, the bounding box
5858
# needs to be specified in axes coordinates ((0, 0) is the lower left corner
5959
# of the axes, (1, 1) is the upper right corner).
6060
# The bounding box (.2, .4, .6, .5) starts at (.2, .4) and ranges to (.8, .9)
6161
# in those coordinates.
62-
# Inside of this bounding box an inset of half the bounding box' width and
62+
# Inside this bounding box an inset of half the bounding box' width and
6363
# three quarters of the bounding box' height is created. The lower left corner
6464
# of the inset is aligned to the lower left corner of the bounding box (loc=3).
6565
# The inset is then offset by the default 0.5 in units of the font size.
@@ -103,7 +103,7 @@
103103
###############################################################################
104104
# In the above the axes transform together with 4-tuple bounding boxes has been
105105
# used as it mostly is useful to specify an inset relative to the axes it is
106-
# an inset to. However other use cases are equally possible. The following
106+
# an inset to. However, other use cases are equally possible. The following
107107
# example examines some of those.
108108
#
109109

examples/axes_grid1/inset_locator_demo2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""
22
====================
3-
Inset Locator Demo 2
3+
Inset locator demo 2
44
====================
55
6-
This Demo shows how to create a zoomed inset via `.zoomed_inset_axes`.
6+
This demo shows how to create a zoomed inset via `.zoomed_inset_axes`.
77
In the first subplot an `.AnchoredSizeBar` shows the zoom effect.
88
In the second subplot a connection to the region of interest is
99
created via `.mark_inset`.
@@ -63,7 +63,7 @@ def add_sizebar(ax, size):
6363
axins2 = zoomed_inset_axes(ax2, zoom=6, loc=1)
6464
axins2.imshow(Z2, extent=extent, origin="lower")
6565

66-
# sub region of the original image
66+
# subregion of the original image
6767
x1, x2, y1, y2 = -1.5, -0.9, -2.5, -1.9
6868
axins2.set_xlim(x1, x2)
6969
axins2.set_ylim(y1, y2)

examples/axes_grid1/simple_axes_divider3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
=====================
3-
Simple Axes Divider 3
3+
Simple axes divider 3
44
=====================
55
66
See also :doc:`/tutorials/toolkits/axes_grid`.
@@ -13,7 +13,7 @@
1313

1414
fig = plt.figure(figsize=(5.5, 4))
1515

16-
# the rect parameter will be ignore as we will set axes_locator
16+
# the rect parameter will be ignored as we will set axes_locator
1717
rect = (0.1, 0.1, 0.8, 0.8)
1818
ax = [fig.add_axes(rect, label="%d" % i) for i in range(4)]
1919

examples/event_handling/cursor_demo.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
"""
22
=================
3-
Cross hair cursor
3+
Cross-hair cursor
44
=================
55
6-
This example adds a cross hair as a data cursor. The cross hair is
6+
This example adds a cross-hair as a data cursor. The cross-hair is
77
implemented as regular line objects that are updated on mouse move.
88
99
We show three implementations:
1010
1111
1) A simple cursor implementation that redraws the figure on every mouse move.
12-
This is a bit slow and you may notice some lag of the cross hair movement.
12+
This is a bit slow, and you may notice some lag of the cross-hair movement.
1313
2) A cursor that uses blitting for speedup of the rendering.
1414
3) A cursor that snaps to data points.
1515
@@ -76,18 +76,18 @@ def on_mouse_move(self, event):
7676
# Faster redrawing using blitting
7777
# """""""""""""""""""""""""""""""
7878
# This technique stores the rendered plot as a background image. Only the
79-
# changed artists (cross hair lines and text) are rendered anew. They are
79+
# changed artists (cross-hair lines and text) are rendered anew. They are
8080
# combined with the background using blitting.
8181
#
8282
# This technique is significantly faster. It requires a bit more setup because
83-
# the background has to be stored without the cross hair lines (see
83+
# the background has to be stored without the cross-hair lines (see
8484
# ``create_new_background()``). Additionally, a new background has to be
8585
# created whenever the figure changes. This is achieved by connecting to the
8686
# ``'draw_event'``.
8787

8888
class BlittedCursor:
8989
"""
90-
A cross hair cursor using blitting for faster redraw.
90+
A cross-hair cursor using blitting for faster redraw.
9191
"""
9292
def __init__(self, ax):
9393
self.ax = ax
@@ -167,7 +167,7 @@ def on_mouse_move(self, event):
167167

168168
class SnappingCursor:
169169
"""
170-
A cross hair cursor that snaps to the data point of a line, which is
170+
A cross-hair cursor that snaps to the data point of a line, which is
171171
closest to the *x* position of the cursor.
172172
173173
For simplicity, this assumes that *x* values of the data are sorted.

examples/event_handling/data_browser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
"""
22
============
3-
Data Browser
3+
Data browser
44
============
55
66
Connecting data between multiple canvases.
77
88
This example covers how to interact data with multiple canvases. This
9-
let's you select and highlight a point on one axis, and generating the
9+
lets you select and highlight a point on one axis, and generating the
1010
data of that point on the other axis.
1111
1212
.. note::

examples/event_handling/legend_picking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
==============
3-
Legend Picking
3+
Legend picking
44
==============
55
66
Enable picking on the legend to toggle the original line on and off
@@ -42,7 +42,7 @@ def on_pick(event):
4242
origline = lined[legline]
4343
visible = not origline.get_visible()
4444
origline.set_visible(visible)
45-
# Change the alpha on the line in the legend so we can see what lines
45+
# Change the alpha on the line in the legend, so we can see what lines
4646
# have been toggled.
4747
legline.set_alpha(1.0 if visible else 0.2)
4848
fig.canvas.draw()

examples/event_handling/path_editor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
===========
3-
Path Editor
3+
Path editor
44
===========
55
66
Sharing events across GUIs.
@@ -47,7 +47,7 @@
4747

4848
class PathInteractor:
4949
"""
50-
An path editor.
50+
A path editor.
5151
5252
Press 't' to toggle vertex markers on and off. When vertex markers are on,
5353
they can be dragged with the mouse.

examples/event_handling/pick_event_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
===============
3-
Pick Event Demo
3+
Pick event demo
44
===============
55
66
You can enable picking by setting the "picker" property of an artist
@@ -56,7 +56,7 @@ def pick_handler(event):
5656
the matplotlib.artist that generated the pick event.
5757
5858
Additionally, certain artists like Line2D and PatchCollection may
59-
attach additional meta data like the indices into the data that meet
59+
attach additional metadata like the indices into the data that meet
6060
the picker criteria (for example, all the points in the line that are within
6161
the specified epsilon tolerance)
6262

examples/event_handling/pick_event_demo2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
================
3-
Pick Event Demo2
4-
================
2+
=================
3+
Pick event demo 2
4+
=================
55
66
Compute the mean (mu) and standard deviation (sigma) of 100 data sets and plot
77
mu vs. sigma. When you click on one of the (mu, sigma) points, plot the raw

0 commit comments

Comments
 (0)