8000 Add missing spaces after commas in docs by anntzer · Pull Request #14687 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Add missing spaces after commas in docs #14687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/axes_grid1/inset_locator_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
ax = fig.add_subplot(121)

# We use the axes transform as bbox_transform. Therefore the bounding box
# needs to be specified in axes coordinates ((0,0) is the lower left corner
# of the axes, (1,1) is the upper right corner).
# The bounding box (.2, .4, .6, .5) starts at (.2,.4) and ranges to (.8,.9)
# needs to be specified in axes coordinates ((0, 0) is the lower left corner
# of the axes, (1, 1) is the upper right corner).
# The bounding box (.2, .4, .6, .5) starts at (.2, .4) and ranges to (.8, .9)
# in those coordinates.
# Inside of this bounding box an inset of half the bounding box' width and
# three quarters of the bounding box' height is created. The lower left corner
Expand Down
2 changes: 1 addition & 1 deletion examples/event_handling/trifinder_event_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def motion_notify(event):
# Setup plot and callbacks.
plt.subplot(111, aspect='equal')
plt.triplot(triang, 'bo-')
polygon = Polygon([[0, 0], [0, 0]], facecolor='y') # dummy data for xs,ys
polygon = Polygon([[0, 0], [0, 0]], facecolor='y') # dummy data for (xs, ys)
update_polygon(-1)
plt.gca().add_patch(polygon)
plt.gcf().canvas.mpl_connect('motion_notify_event', motion_notify)
Expand Down
2 changes: 1 addition & 1 deletion examples/event_handling/zoom_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

If you click on a point in the first window, the z and y limits of the second
will be adjusted so that the center of the zoom in the second window will be
the x,y coordinates of the clicked point.
the (x, y) coordinates of the clicked point.

Note the diameter of the circles in the scatter are defined in points**2, so
their size is independent of the zoom.
Expand Down
8 changes: 4 additions & 4 deletions examples/images_contours_and_fields/image_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@
# achieving the look you want. Below we'll display the same (small) array,
# interpolated with three different interpolation methods.
#
# The center of the pixel at A[i,j] is plotted at i+0.5, i+0.5. If you
# are using interpolation='nearest', the region bounded by (i,j) and
# (i+1,j+1) will have the same color. If you are using interpolation,
# The center of the pixel at A[i, j] is plotted at (i+0.5, i+0.5). If you
# are using interpolation='nearest', the region bounded by (i, j) and
# (i+1, j+1) will have the same color. If you are using interpolation,
# the pixel center will have the same color as it does with nearest, but
# other pixels will be interpolated between the neighboring pixels.
#
Expand Down Expand Up @@ -129,7 +129,7 @@

###############################################################################
# You can specify whether images should be plotted with the array origin
# x[0,0] in the upper left or lower right by using the origin parameter.
# x[0, 0] in the upper left or lower right by using the origin parameter.
# You can also control the default setting image.origin in your
# :ref:`matplotlibrc file <customizing-with-matplotlibrc-files>`. For more on
# this topic see the :doc:`complete guide on origin and extent
Expand Down
5 changes: 1 addition & 4 deletions examples/images_contours_and_fields/irregulardatagrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
xi = np.linspace(-2.1, 2.1, ngridx)
yi = np.linspace(-2.1, 2.1, ngridy)

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


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

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


# ----------
# Tricontour
# ----------
Expand Down
2 changes: 1 addition & 1 deletion examples/lines_bars_and_markers/psd_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
# s = 0.1*sin(2*pi*t) + cnse;
#
# subplot(211)
# plot(t,s)
# plot(t, s)
# subplot(212)
# psd(s, 512, 1/dt)
#
Expand Down
2 changes: 1 addition & 1 deletion examples/lines_bars_and_markers/scatter_piecharts.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
sizes = np.array([60, 80, 120])

# calculate the points of the first pie marker
# these are just the origin (0,0) + some points on a circle cos,sin
# these are just the origin (0, 0) + some (cos, sin) points on a circle
x1 = np.cos(2 * np.pi * np.linspace(0, r1))
y1 = np.sin(2 * np.pi * np.linspace(0, r1))
xy1 = np.row_stack([[0, 0], np.column_stack([x1, y1])])
Expand Down
2 changes: 1 addition & 1 deletion examples/misc/customize_rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def set_pub():
>>> set_pub()
>>> subplot(111)
>>> plot([1,2,3])
>>> plot([1, 2, 3])
>>> savefig('myfig')
>>> rcdefaults() # restore the defaults
Expand Down
6 changes: 3 additions & 3 deletions examples/misc/demo_agg_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,16 +264,16 @@ def drop_shadow_patches(ax):
men_means = [20, 35, 30, 35, 27]

ind = np.arange(N) # the x locations for the groups
width = 0.35 # the width of the bars
width = 0.35 # the width of the bars

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

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

# gauss = GaussianFilter(1.5, offsets=(1,1), )
gauss = DropShadowFilter(5, offsets=(1, 1), )
# gauss = GaussianFilter(1.5, offsets=(1, 1))
gauss = DropShadowFilter(5, offsets=(1, 1))
shadow = FilteredArtistList(rects1 + rects2, gauss)
ax.add_artist(shadow)
shadow.set_zorder(rects1[0].get_zorder() - 0.1)
Expand Down
4 changes: 2 additions & 2 deletions examples/misc/set_and_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
To set the linestyle of a line to be dashed, you can do::
>>> line, = plt.plot([1,2,3])
>>> line, = plt.plot([1, 2, 3])
>>> plt.setp(line, linestyle='--')
If you want to know the valid types of arguments, you can provide the
Expand All @@ -31,7 +31,7 @@
the instances will be set. e.g., suppose you have a list of two lines,
the following will make both lines thicker and red::
>>> x = np.arange(0,1.0,0.01)
>>> x = np.arange(0, 1, 0.01)
>>> y1 = np.sin(2*np.pi*x)
>>> y2 = np.sin(4*np.pi*x)
>>> lines = plt.plot(x, y1, x, y2)
Expand Down
6 changes: 3 additions & 3 deletions examples/mplot3d/2dcollections3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Plot a sin curve using the x and y axes.
x = np.linspace(0, 1, 100)
y = np.sin(x * 2 * np.pi) / 2 + 0.5
ax.plot(x, y, zs=0, zdir='z', label='curve in (x,y)')
ax.plot(x, y, zs=0, zdir='z', label='curve in (x, y)')

# Plot scatterplot data (20 2D points per colour) on the x and z axes.
colors = ('r', 'g', 'b', 'k')
Expand All @@ -30,8 +30,8 @@
for c in colors:
c_list.extend([c] * 20)
# By using zdir='y', the y value of these points is fixed to the zs value 0
# and the (x,y) points are plotted on the x and z axes.
ax.scatter(x, y, zs=0, zdir='y', c=c_list, label='points in (x,z)')
# and the (x, y) points are plotted on the x and z axes.
ax.scatter(x, y, zs=0, zdir='y', c=c_list, label='points in (x, z)')

# Make legend, set axes limits and labels
ax.legend()
Expand Down
4 changes: 2 additions & 2 deletions examples/mplot3d/contour3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Demonstrates plotting contour (level) curves in 3D
==================================================
This is like a contour plot in 2D except that the f(x,y)=c curve is plotted
on the plane z=c.
This is like a contour plot in 2D except that the ``f(x, y)=c`` curve is
plotted on the plane ``z=c``.
"""

from mpl_toolkits.mplot3d import axes3d
Expand Down
3 changes: 2 additions & 1 deletion examples/mplot3d/polys3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def polygon_under_graph(xlist, ylist):
fig = plt.figure()
ax = fig.gca(projection='3d')

# Make verts a list, verts[i] will be a list of (x,y) pairs defining polygon i
# Make verts a list such that verts[i] is a list of (x, y) pairs defining
# polygon i.
verts = []

# Set up the x sequence
Expand Down
2 changes: 1 addition & 1 deletion examples/pie_and_polar_charts/pie_and_donut_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# the pie. Here we use the axes coordinates ``(1, 0, 0.5, 1)`` together
# with the location ``"center left"``; i.e.
# the left central point of the legend will be at the left central point of the
# bounding box, spanning from ``(1,0)`` to ``(1.5,1)`` in axes coordinates.
# bounding box, spanning from ``(1, 0)`` to ``(1.5, 1)`` in axes coordinates.

import numpy as np
import matplotlib.pyplot as plt
Expand Down
2 changes: 1 addition & 1 deletion examples/pyplots/annotation_polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

fig = plt.figure()
ax = fig.add_subplot(111, polar=True)
r = np.arange(0,1,0.001)
r = np.arange(0, 1, 0.001)
theta = 2 * 2*np.pi * r
line, = ax.plot(theta, r, color='#ee8d18', lw=3)

Expand Down
2 changes: 1 addition & 1 deletion examples/pyplots/auto_subplots_adjust.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

fig, ax = plt.subplots()
ax.plot(range(10))
ax.set_yticks((2,5,7))
ax.set_yticks((2, 5, 7))
labels = ax.set_yticklabels(('really, really, really', 'long', 'labels'))

def on_draw(event):
Expand Down
2 changes: 1 addition & 1 deletion examples/pyplots/boxplot_demo_pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
# This is actually more efficient because boxplot converts
# a 2-D array into a list of vectors internally anyway.

data = [data, d2, d2[::2,0]]
data = [data, d2, d2[::2, 0]]
fig7, ax7 = plt.subplots()
ax7.set_title('Multiple Samples with Different sizes')
ax7.boxplot(data)
Expand Down