Skip to content

Commit 4f0a481

Browse files
committed
examples: remove newlines @eof + remove spaces/tabs from emtpy lines
steps to reproduce (autopep8 -i --select E111 */*.py) + remove changes in non-empty lines Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
1 parent 583ae91 commit 4f0a481

File tree

106 files changed

+30
-175
lines changed

Some content is hidden

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

106 files changed

+30
-175
lines changed

examples/color/color_cycle_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,3 @@
3030
# Tweak spacing between subplots to prevent labels from overlapping
3131
plt.subplots_adjust(hspace=0.3)
3232
plt.show()
33-
34-

examples/event_handling/data_browser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,3 @@ def update(self):
7979
fig.canvas.mpl_connect('key_press_event', browser.onpress)
8080

8181
plt.show()
82-

examples/event_handling/figure_axes_enter_leave.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,3 @@ def leave_figure(event):
4646
fig2.canvas.mpl_connect('axes_leave_event', leave_axes)
4747

4848
plt.show()
49-
50-

examples/event_handling/idle_and_timeout.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,3 @@ def on_idle(event):
3333
fig.canvas.mpl_connect('idle_event', on_idle)
3434

3535
plt.show()
36-
37-

examples/event_handling/path_editor.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,3 @@ def motion_notify_callback(self, event):
136136
ax.set_ylim(-3,4)
137137

138138
plt.show()
139-
140-

examples/event_handling/pick_event_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,3 @@ def onpick4(event):
172172

173173

174174
plt.show()
175-

examples/event_handling/pick_event_demo2.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,3 @@ def onpick(event):
3636
fig.canvas.mpl_connect('pick_event', onpick)
3737

3838
plt.show()
39-
40-
41-
42-
43-

examples/event_handling/poly_editor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,3 @@ def motion_notify_callback(self, event):
159159
ax.set_xlim((-2,2))
160160
ax.set_ylim((-2,2))
161161
plt.show()
162-

examples/event_handling/zoom_window.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ def onpress(event):
3636

3737
figsrc.canvas.mpl_connect('button_press_event', onpress)
3838
show()
39-

examples/images_contours_and_fields/image_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@
1010
plt.imshow(image)
1111
plt.axis('off') # clear x- and y-axes
1212
plt.show()
13-

examples/images_contours_and_fields/streamplot_demo_features.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,3 @@
2626
ax2.streamplot(X, Y, U, V, density=0.6, color='k', linewidth=lw)
2727

2828
plt.show()
29-

examples/images_contours_and_fields/streamplot_demo_masking.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@
2424
interpolation='nearest', cmap=plt.cm.gray)
2525

2626
plt.show()
27-

examples/misc/image_thumbnail.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@
2727
outfile = os.path.join(outdir, basename)
2828
fig = image.thumbnail(fname, outfile, scale=0.15)
2929
print('saved thumbnail of %s to %s'%(fname, outfile))
30-

examples/misc/svg_filter_pie.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
s.set_gid(w.get_gid()+"_shadow")
4040
s.set_zorder(w.get_zorder() - 0.1)
4141
ax.add_patch(s)
42-
42+
4343

4444
# save
4545
from StringIO import StringIO

examples/mplot3d/2dcollections3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@
2121
ax.set_zlim3d(0, 1)
2222

2323
plt.show()
24-

examples/mplot3d/bars3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@
1919
ax.set_zlabel('Z')
2020

2121
plt.show()
22-

examples/mplot3d/contour3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99
ax.clabel(cset, fontsize=9, inline=1)
1010

1111
plt.show()
12-

examples/mplot3d/contour3d_demo2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99
ax.clabel(cset, fontsize=9, inline=1)
1010

1111
plt.show()
12-

examples/mplot3d/contour3d_demo3.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@
1818
ax.set_zlim(-100, 100)
1919

2020
plt.show()
21-

examples/mplot3d/contourf3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99
ax.clabel(cset, fontsize=9, inline=1)
1010

1111
plt.show()
12-

examples/mplot3d/contourf3d_demo2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@
2323
ax.set_zlim(-100, 100)
2424

2525
plt.show()
26-

examples/mplot3d/hist3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@
2020
ax.bar3d(xpos, ypos, zpos, dx, dy, dz, color='b', zsort='average')
2121

2222
plt.show()
23-

examples/mplot3d/lines3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@
1616
ax.legend()
1717

1818
plt.show()
19-

examples/mplot3d/lorenz_attractor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ def lorenz(x, y, z, s=10, r=28, b=2.667) :
4747
ax.set_title("Lorenz Attractor")
4848

4949
plt.show()
50-

examples/mplot3d/mixed_subplots_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ def f(t):
4747
ax.set_zlim3d(-1, 1)
4848

4949
plt.show()
50-

examples/mplot3d/offset_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@
2323
ax.set_zlim(0, 2)
2424

2525
plt.show()
26-

examples/mplot3d/polys3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@
3030
ax.set_zlim3d(0, 1)
3131

3232
plt.show()
33-

examples/mplot3d/quiver3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@
1717
ax.quiver(x, y, z, u, v, w, length=0.1)
1818

1919
plt.show()
20-

examples/mplot3d/rotate_axes3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@
1212
for angle in range(0, 360):
1313
ax.view_init(30, angle)
1414
plt.draw()
15-

examples/mplot3d/scatter3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ def randrange(n, vmin, vmax):
2020
ax.set_zlabel('Z Label')
2121

2222
plt.show()
23-

examples/mplot3d/subplot3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@
2929
ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10)
3030

3131
plt.show()
32-

examples/mplot3d/surface3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@
2121
fig.colorbar(surf, shrink=0.5, aspect=5)
2222

2323
plt.show()
24-

examples/mplot3d/surface3d_demo2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@
1414
ax.plot_surface(x, y, z, rstride=4, cstride=4, color='b')
1515

1616
plt.show()
17-

examples/mplot3d/surface3d_demo3.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@
2727
ax.w_zaxis.set_major_locator(LinearLocator(6))
2828

2929
plt.show()
30-

examples/mplot3d/text3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@
2525
ax.set_zlabel('Z axis')
2626

2727
plt.show()
28-

examples/mplot3d/wire3d_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10)
99

1010
plt.show()
11-

examples/pylab_examples/anchored_artists.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,3 @@ def __init__(self, width, height, xdescent, ydescent,
108108

109109
plt.draw()
110110
plt.show()
111-
112-
113-
114-

examples/pylab_examples/arctest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ def f(t):
1616
setp(l, 'markerfacecolor', 'b')
1717

1818
show()
19-

examples/pylab_examples/axis_equal_demo.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,3 @@
2929
title('still equal after adding line',fontsize=10)
3030

3131
show()
32-
33-
34-
35-
36-

examples/pylab_examples/barcode_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@
2323

2424

2525
show()
26-

examples/pylab_examples/boxplot_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,3 @@
5555
boxplot(data)
5656

5757
show()
58-

examples/pylab_examples/clippedline.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,3 @@ def draw(self, renderer):
5555
ax.set_xlim(10,30)
5656
ax.set_ylim(-1.1,1.1)
5757
show()
58-
59-

examples/pylab_examples/cohere_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,3 @@
3232
cxy, f = plt.cohere(s1, s2, 256, 1./dt)
3333
plt.ylabel('coherence')
3434
plt.show()
35-
36-

examples/pylab_examples/colours.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,3 @@ def get_colours(n):
5050
(base[start+1] * x))
5151

5252
return [pastel(c) for c in colours[0:n]]
53-

examples/pylab_examples/contour_label_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,3 @@ def __repr__(self):
8585
plt.title("$100^Z$")
8686

8787
plt.show()
88-

examples/pylab_examples/contourf_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,3 @@
104104
ax.locator_params(nbins=4)
105105

106106
plt.show()
107-

examples/pylab_examples/contourf_log.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,3 @@
4444
cbar = P.colorbar()
4545

4646
P.show()
47-
48-

examples/pylab_examples/coords_report.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ def millions(x):
1616
plot(x, y, 'o')
1717

1818
show()
19-

examples/pylab_examples/csd_demo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,3 @@
3232
cxy, f = plt.csd(s1, s2, 256, 1./dt)
3333
plt.ylabel('CSD (db)')
3434
plt.show()
35-
36-

examples/pylab_examples/cursor_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,3 @@ def mouse_move(self, event):
7878
ax.plot(t, s, 'o')
7979
axis([0,1,-1,1])
8080
show()
81-

examples/pylab_examples/custom_cmap.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,3 @@
189189
plt.suptitle('Custom Blue-Red colormaps', fontsize=16)
190190

191191
plt.show()
192-

examples/pylab_examples/custom_figure_class.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ def __init__(self, *args, **kwargs):
1919
ax.plot([1,2,3])
2020

2121
show()
22-

examples/pylab_examples/dashpointlabel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@
3535
ax.set_ylim((0.0, 5.0))
3636

3737
plt.show()
38-

examples/pylab_examples/demo_agg_filter.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def light_filter_pie(ax):
311311

312312

313313
if 1:
314-
314+
315315
plt.figure(1, figsize=(6, 6))
316316
plt.subplots_adjust(left=0.05, right=0.95)
317317

@@ -330,5 +330,3 @@ def light_filter_pie(ax):
330330
ax.set_frame_on(True)
331331

332332
plt.show()
333-
334-

examples/pylab_examples/demo_ribbon_box.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,3 @@ def draw(self, renderer, *args, **kwargs):
132132

133133
fig.savefig('ribbon_box.png')
134134
plt.show()
135-

examples/pylab_examples/demo_text_path.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __init__(self, path, bbox_image, **kwargs):
3131
def set_facecolor(self, color):
3232
"""simply ignore facecolor"""
3333
mpatches.PathPatch.set_facecolor(self, "none")
34-
34+
3535
def _init_bbox_image(self, im):
3636

3737
bbox_image = BboxImage(self.get_window_extent,
@@ -55,7 +55,7 @@ def draw(self, renderer=None):
5555
if 1:
5656

5757
usetex = plt.rcParams["text.usetex"]
58-
58+
5959
fig = plt.figure(1)
6060

6161
# EXAMPLE 1
@@ -86,10 +86,10 @@ def draw(self, renderer=None):
8686
r = r"\mbox{textpath supports mathtext \& \TeX}"
8787
else:
8888
r = r"textpath supports mathtext & TeX"
89-
89+
9090
text_path = TextPath((0, 0), r,
9191
size=20, usetex=usetex)
92-
92+
9393
p1 = PathPatch(text_path, ec="w", lw=3, fc="w", alpha=0.9,
9494
transform=IdentityTransform())
9595
p2 = PathPatch(text_path, ec="none", fc="k",

examples/pylab_examples/demo_tight_layout.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,3 @@ def example_plot(ax):
102102
gs2.update(top=top, bottom=bottom)
103103

104104
plt.show()
105-
106-
107-

examples/pylab_examples/ellipse_collection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,3 @@
3030
cbar = plt.colorbar(ec)
3131
cbar.set_label('X+Y')
3232
plt.show()
33-
34-

examples/pylab_examples/fancybox_demo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def test2(ax):
6767
# draws control points for the fancy box.
6868
#l = p_fancy.get_path().vertices
6969
#ax.plot(l[:,0], l[:,1], ".")
70-
70+
7171
draw_bbox(ax, bb)
7272

7373

@@ -92,15 +92,15 @@ def test3(ax):
9292
# draws control points for the fancy box.
9393
#l = p_fancy.get_path().vertices
9494
#ax.plot(l[:,0], l[:,1], ".")
95-
95+
9696
draw_bbox(ax, bb)
9797

9898

9999
def test4(ax):
100100

101101
# When the aspect ratio of the axes is not 1, the fancy box may
102102
# not be what you expected (green)
103-
103+
104104
p_fancy = FancyBboxPatch((bb.xmin, bb.ymin),
105105
abs(bb.width), abs(bb.height),
106106
boxstyle="round,pad=0.2",
@@ -122,7 +122,7 @@ def test4(ax):
122122
ax.text(0.1, 0.8,
123123
' boxstyle="round,pad=0.3"\n mutation\\_aspect=.5',
124124
size=10, transform=ax.transAxes)
125-
125+
126126
draw_bbox(ax, bb)
127127

128128

examples/pylab_examples/fancybox_demo2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@
1616
bbox=dict(boxstyle=stylename, fc="w", ec="k"))
1717
plt.draw()
1818
plt.show()
19-

0 commit comments

Comments
 (0)