Skip to content

Commit 5b0de04

Browse files
committed
rerun autopep8
1 parent 34f4ffb commit 5b0de04

File tree

8 files changed

+25
-25
lines changed

8 files changed

+25
-25
lines changed

examples/event_handling/poly_editor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def key_press_callback(self, event):
121121
p = event.x, event.y # display coords
122122
for i in range(len(xys) - 1):
123123
s0 = xys[i]
124-
s1 = xys[i+1]
124+
s1 = xys[i + 1]
125125
d = dist_point_to_segment(p, s0, s1)
126126
if d <= self.epsilon:
127127
self.poly.xy = np.array(

examples/images_contours_and_fields/interpolation_none_vs_nearest.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
import matplotlib.pyplot as plt
1616
import matplotlib.cbook as cbook
1717

18-
#Load big image
18+
# Load big image
1919
big_im_path = cbook.get_sample_data('necked_tensile_specimen.png')
2020
big_im = plt.imread(big_im_path)
21-
#Define small image
21+
# Define small image
2222
small_im = np.array([[0.25, 0.75, 1.0, 0.75], [0.1, 0.65, 0.5, 0.4],
23-
[0.6, 0.3, 0.0, 0.2], [0.7, 0.9, 0.4, 0.6]])
23+
[0.6, 0.3, 0.0, 0.2], [0.7, 0.9, 0.4, 0.6]])
2424

25-
#Create a 2x2 table of plots
25+
# Create a 2x2 table of plots
2626
fig = plt.figure(figsize=[8.0, 7.5])
2727
ax = plt.subplot(2, 2, 1)
2828
ax.imshow(big_im, interpolation='none')
@@ -33,27 +33,27 @@
3333
ax = plt.subplot(2, 2, 4)
3434
ax.imshow(small_im, interpolation='nearest')
3535
plt.subplots_adjust(left=0.24, wspace=0.2, hspace=0.1,
36-
bottom=0.05, top=0.86)
36+
bottom=0.05, top=0.86)
3737

38-
#Label the rows and columns of the table
38+
# Label the rows and columns of the table
3939
fig.text(0.03, 0.645, 'Big Image\nScaled Down', ha='left')
4040
fig.text(0.03, 0.225, 'Small Image\nBlown Up', ha='left')
4141
fig.text(0.383, 0.90, "Interpolation = 'none'", ha='center')
4242
fig.text(0.75, 0.90, "Interpolation = 'nearest'", ha='center')
4343

44-
#If you were going to run this example on your local machine, you
45-
#would save the figure as a PNG, save the same figure as a PDF, and
46-
#then compare them. The following code would suffice.
44+
# If you were going to run this example on your local machine, you
45+
# would save the figure as a PNG, save the same figure as a PDF, and
46+
# then compare them. The following code would suffice.
4747
txt = fig.text(0.452, 0.95, 'Saved as a PNG', fontsize=18)
48-
# plt.savefig('None_vs_nearest-png.png')
49-
# txt.set_text('Saved as a PDF')
50-
# plt.savefig('None_vs_nearest-pdf.pdf')
51-
52-
#Here, however, we need to display the PDF on a webpage, which means
53-
#the PDF must be converted into an image. For the purposes of this
54-
#example, the 'Nearest_vs_none-pdf.pdf' has been pre-converted into
55-
#'Nearest_vs_none-pdf.png' at 80 dpi. We simply need to load and
56-
#display it.
48+
#plt.savefig('None_vs_nearest-png.png')
49+
#txt.set_text('Saved as a PDF')
50+
#plt.savefig('None_vs_nearest-pdf.pdf')
51+
52+
# Here, however, we need to display the PDF on a webpage, which means
53+
# the PDF must be converted into an image. For the purposes of this
54+
# example, the 'Nearest_vs_none-pdf.pdf' has been pre-converted into
55+
# 'Nearest_vs_none-pdf.png' at 80 dpi. We simply need to load and
56+
# display it.
5757
pdf_im_path = cbook.get_sample_data('None_vs_nearest-pdf.png')
5858
pdf_im = plt.imread(pdf_im_path)
5959
fig2 = plt.figure(figsize=[8.0, 7.5])

examples/mplot3d/hist3d_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
hist, xedges, yedges = np.histogram2d(x, y, bins=4)
99

1010
elements = (len(xedges) - 1) * (len(yedges) - 1)
11-
xpos, ypos = np.meshgrid(xedges[:-1]+0.25, yedges[:-1]+0.25)
11+
xpos, ypos = np.meshgrid(xedges[:-1] + 0.25, yedges[:-1] + 0.25)
1212

1313
xpos = xpos.flatten()
1414
ypos = ypos.flatten()

examples/mplot3d/mixed_subplots_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def f(t):
4242
Z = np.sin(R)
4343

4444
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1,
45-
linewidth=0, antialiased=False)
45+
linewidth=0, antialiased=False)
4646

4747
ax.set_zlim3d(-1, 1)
4848

examples/mplot3d/scatter3d_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def randrange(n, vmin, vmax):
7-
return (vmax-vmin)*np.random.rand(n) + vmin
7+
return (vmax - vmin)*np.random.rand(n) + vmin
88

99
fig = plt.figure()
1010
ax = fig.add_subplot(111, projection='3d')

examples/mplot3d/subplot3d_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
R = np.sqrt(X**2 + Y**2)
1919
Z = np.sin(R)
2020
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm,
21-
linewidth=0, antialiased=False)
21+
linewidth=0, antialiased=False)
2222
ax.set_zlim3d(-1.01, 1.01)
2323

2424
fig.colorbar(surf, shrink=0.5, aspect=10)

examples/mplot3d/surface3d_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
R = np.sqrt(X**2 + Y**2)
1313
Z = np.sin(R)
1414
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm,
15-
linewidth=0, antialiased=False)
15+
linewidth=0, antialiased=False)
1616
ax.set_zlim(-1.01, 1.01)
1717

1818
ax.zaxis.set_major_locator(LinearLocator(10))

examples/mplot3d/surface3d_demo3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
colors[x, y] = colortuple[(x + y) % len(colortuple)]
2222

2323
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=colors,
24-
linewidth=0, antialiased=False)
24+
linewidth=0, antialiased=False)
2525

2626
ax.set_zlim3d(-1, 1)
2727
ax.w_zaxis.set_major_locator(LinearLocator(6))

0 commit comments

Comments
 (0)