Skip to content

Commit b547660

Browse files
committed
Add missing spaces after commas.
... and various other small docstring fixes.
1 parent 9f1c730 commit b547660

File tree

97 files changed

+417
-459
lines changed

Some content is hidden

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

97 files changed

+417
-459
lines changed

examples/axes_grid1/inset_locator_demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
ax = fig.add_subplot(121)
5656

5757
# We use the axes transform as bbox_transform. Therefore the bounding box
58-
# needs to be specified in axes coordinates ((0,0) is the lower left corner
59-
# of the axes, (1,1) is the upper right corner).
60-
# The bounding box (.2, .4, .6, .5) starts at (.2,.4) and ranges to (.8,.9)
58+
# needs to be specified in axes coordinates ((0, 0) is the lower left corner
59+
# of the axes, (1, 1) is the upper right corner).
60+
# The bounding box (.2, .4, .6, .5) starts at (.2, .4) and ranges to (.8, .9)
6161
# in those coordinates.
6262
# Inside of 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

examples/event_handling/trifinder_event_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def motion_notify(event):
5454
# Setup plot and callbacks.
5555
plt.subplot(111, aspect='equal')
5656
plt.triplot(triang, 'bo-')
57-
polygon = Polygon([[0, 0], [0, 0]], facecolor='y') # dummy data for xs,ys
57+
polygon = Polygon([[0, 0], [0, 0]], facecolor='y') # dummy data for (xs, ys)
5858
update_polygon(-1)
5959
plt.gca().add_patch(polygon)
6060
plt.gcf().canvas.mpl_connect('motion_notify_event', motion_notify)

examples/event_handling/zoom_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
If you click on a point in the first window, the z and y limits of the second
1010
will be adjusted so that the center of the zoom in the second window will be
11-
the x,y coordinates of the clicked point.
11+
the (x, y) coordinates of the clicked point.
1212
1313
Note the diameter of the circles in the scatter are defined in points**2, so
1414
their size is independent of the zoom.

examples/images_contours_and_fields/image_demo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@
7878
# achieving the look you want. Below we'll display the same (small) array,
7979
# interpolated with three different interpolation methods.
8080
#
81-
# The center of the pixel at A[i,j] is plotted at i+0.5, i+0.5. If you
82-
# are using interpolation='nearest', the region bounded by (i,j) and
83-
# (i+1,j+1) will have the same color. If you are using interpolation,
81+
# The center of the pixel at A[i, j] is plotted at (i+0.5, i+0.5). If you
82+
# are using interpolation='nearest', the region bounded by (i, j) and
83+
# (i+1, j+1) will have the same color. If you are using interpolation,
8484
# the pixel center will have the same color as it does with nearest, but
8585
# other pixels will be interpolated between the neighboring pixels.
8686
#
@@ -129,7 +129,7 @@
129129

130130
###############################################################################
131131
# You can specify whether images should be plotted with the array origin
132-
# x[0,0] in the upper left or lower right by using the origin parameter.
132+
# x[0, 0] in the upper left or lower right by using the origin parameter.
133133
# You can also control the default setting image.origin in your
134134
# :ref:`matplotlibrc file <customizing-with-matplotlibrc-files>`. For more on
135135
# this topic see the :doc:`complete guide on origin and extent

examples/images_contours_and_fields/irregulardatagrid.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444
xi = np.linspace(-2.1, 2.1, ngridx)
4545
yi = np.linspace(-2.1, 2.1, ngridy)
4646

47-
# Perform linear interpolation of the data (x,y)
48-
# on a grid defined by (xi,yi)
47+
# Linearly interpolate the data (x, y) on a grid defined by (xi, yi).
4948
triang = tri.Triangulation(x, y)
5049
interpolator = tri.LinearTriInterpolator(triang, z)
5150
Xi, Yi = np.meshgrid(xi, yi)
@@ -56,7 +55,6 @@
5655
#from scipy.interpolate import griddata
5756
#zi = griddata((x, y), z, (xi[None,:], yi[:,None]), method='linear')
5857

59-
6058
ax1.contour(xi, yi, zi, levels=14, linewidths=0.5, colors='k')
6159
cntr1 = ax1.contourf(xi, yi, zi, levels=14, cmap="RdBu_r")
6260

@@ -66,7 +64,6 @@
6664
ax1.set_title('grid and contour (%d points, %d grid points)' %
6765
(npts, ngridx * ngridy))
6866

69-
7067
# ----------
7168
# Tricontour
7269
# ----------

examples/lines_bars_and_markers/psd_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
# s = 0.1*sin(2*pi*t) + cnse;
4646
#
4747
# subplot(211)
48-
# plot(t,s)
48+
# plot(t, s)
4949
# subplot(212)
5050
# psd(s, 512, 1/dt)
5151
#

examples/lines_bars_and_markers/scatter_piecharts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
sizes = np.array([60, 80, 120])
2020

2121
# calculate the points of the first pie marker
22-
# these are just the origin (0,0) + some points on a circle cos,sin
22+
# these are just the origin (0, 0) + some (cos, sin) points on a circle
2323
x1 = np.cos(2 * np.pi * np.linspace(0, r1))
2424
y1 = np.sin(2 * np.pi * np.linspace(0, r1))
2525
xy1 = np.row_stack([[0, 0], np.column_stack([x1, y1])])

examples/misc/customize_rc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def set_pub():
2222
2323
>>> set_pub()
2424
>>> subplot(111)
25-
>>> plot([1,2,3])
25+
>>> plot([1, 2, 3])
2626
>>> savefig('myfig')
2727
>>> rcdefaults() # restore the defaults
2828

examples/misc/demo_agg_filter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,16 +264,16 @@ def drop_shadow_patches(ax):
264264
men_means = [20, 35, 30, 35, 27]
265265

266266
ind = np.arange(N) # the x locations for the groups
267-
width = 0.35 # the width of the bars
267+
width = 0.35 # the width of the bars
268268

269269
rects1 = ax.bar(ind, men_means, width, color='r', ec="w", lw=2)
270270

271271
women_means = [25, 32, 34, 20, 25]
272272
rects2 = ax.bar(ind + width + 0.1, women_means, width,
273273
color='y', ec="w", lw=2)
274274

275-
# gauss = GaussianFilter(1.5, offsets=(1,1), )
276-
gauss = DropShadowFilter(5, offsets=(1, 1), )
275+
# gauss = GaussianFilter(1.5, offsets=(1, 1))
276+
gauss = DropShadowFilter(5, offsets=(1, 1))
277277
shadow = FilteredArtistList(rects1 + rects2, gauss)
278278
ax.add_artist(shadow)
279279
shadow.set_zorder(rects1[0].get_zorder() - 0.1)

examples/misc/set_and_get.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
To set the linestyle of a line to be dashed, you can do::
1313
14-
>>> line, = plt.plot([1,2,3])
14+
>>> line, = plt.plot([1, 2, 3])
1515
>>> plt.setp(line, linestyle='--')
1616
1717
If you want to know the valid types of arguments, you can provide the
@@ -31,7 +31,7 @@
3131
the instances will be set. e.g., suppose you have a list of two lines,
3232
the following will make both lines thicker and red::
3333
34-
>>> x = np.arange(0,1.0,0.01)
34+
>>> x = np.arange(0, 1, 0.01)
3535
>>> y1 = np.sin(2*np.pi*x)
3636
>>> y2 = np.sin(4*np.pi*x)
3737
>>> lines = plt.plot(x, y1, x, y2)

0 commit comments

Comments
 (0)