Skip to content

Commit 1f53454

Browse files
committed
remove trailing spaces
svn path=/trunk/matplotlib/; revision=3371
1 parent e8f4297 commit 1f53454

File tree

199 files changed

+3304
-3304
lines changed

Some content is hidden

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

199 files changed

+3304
-3304
lines changed

examples/agg_resize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55

66
imMatrix = agg.trans_affine(1,0,0,1,0,0)
7-
interp = agg.span_interpolator_linear(imMatrix);
7+
interp = agg.span_interpolator_linear(imMatrix);

examples/agg_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
pf = agg.pixel_format_rgba(rbuf)
2424
rbase = agg.renderer_base_rgba(pf)
25-
rbase.clear_rgba8(blue)
25+
rbase.clear_rgba8(blue)
2626

2727
renderer = agg.renderer_scanline_aa_solid_rgba(rbase);
2828
renderer.color_rgba8( red )
@@ -107,7 +107,7 @@
107107
agg.render_scanlines_rgba(rasterizer, scanline, renderer);
108108

109109
## Copy a rectangle from the buffer the rectangle defined by
110-
## x0,y0->x1,y1 and paste it at xdest, ydest
110+
## x0,y0->x1,y1 and paste it at xdest, ydest
111111
x0, y0 = 10, 50
112112
x1, y1 = 110, 190
113113
xdest, ydest = 350, 200

examples/anim_tk.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def run(*args):
4242
cnt = updatefig()
4343
if cnt==100: break
4444
print 'elapsed', 100.0/(time.time() - tstart)
45-
45+
4646
import Tkinter as Tk
4747
manager.window.after(10, run)
4848
manager.show()

examples/animation_blit_fltk.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ def __init__(self,ax):
2121
self.tstart = time.time()
2222

2323
def clear(self,event):
24-
self.background = self.canvas.copy_from_bbox(self.ax.bbox)
24+
self.background = self.canvas.copy_from_bbox(self.ax.bbox)
2525

2626
def update(self,ptr):
2727
# restore the clean slate background
2828
if self.background is None:
29-
self.background = self.canvas.copy_from_bbox(self.ax.bbox)
29+
self.background = self.canvas.copy_from_bbox(self.ax.bbox)
3030
self.canvas.restore_region(self.background)
3131
# update the data
32-
line.set_ydata(nx.sin(x+self.cnt/10.0))
32+
line.set_ydata(nx.sin(x+self.cnt/10.0))
3333
# just draw the animated artist
3434
self.ax.draw_artist(line)
3535
# just redraw the axes rectangle
36-
self.canvas.blit(ax.bbox)
36+
self.canvas.blit(ax.bbox)
3737
self.cnt+=1
3838
if self.cnt==1000:
3939
# print the timing info and quit
@@ -48,7 +48,7 @@ def update(self,ptr):
4848
x = nx.arange(0,2*nx.pi,0.01)
4949
line, = p.plot(x, nx.sin(x), animated=True)
5050
p.draw()
51-
anim=animator(ax)
51+
anim=animator(ax)
5252

5353
fltk.Fl.add_idle(anim.update)
5454
fltk.Fl.run()

examples/animation_blit_qt.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,34 @@ def __init__(self):
2525
self.ax = p.subplot(111)
2626
self.canvas = self.ax.figure.canvas
2727
self.cnt = 0
28-
28+
2929
# create the initial line
3030
self.x = nx.arange(0,2*nx.pi,0.01)
3131
self.line, = p.plot(self.x, nx.sin(self.x), animated=True, lw=2)
32-
32+
3333
self.background = None
34-
34+
3535
def timerEvent(self, evt):
3636
if self.background is None:
3737
self.background = self.canvas.copy_from_bbox(self.ax.bbox)
38-
38+
3939
# restore the clean slate background
4040
self.canvas.restore_region(self.background)
4141
# update the data
42-
self.line.set_ydata(nx.sin(self.x+self.cnt/10.0))
42+
self.line.set_ydata(nx.sin(self.x+self.cnt/10.0))
4343
# just draw the animated artist
4444
self.ax.draw_artist(self.line)
4545
# just redraw the axes rectangle
46-
self.canvas.blit(self.ax.bbox)
47-
46+
self.canvas.blit(self.ax.bbox)
47+
4848
if self.cnt==ITERS:
4949
# print the timing info and quit
5050
print 'FPS:' , ITERS/(time.time()-self.tstart)
5151
sys.exit()
5252

5353
else:
5454
self.cnt += 1
55-
55+
5656
p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
5757
p.grid() # to ensure proper background restore
5858

examples/animation_blit_qt4.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,34 @@ def __init__(self):
2020
self.ax = p.subplot(111)
2121
self.canvas = self.ax.figure.canvas
2222
self.cnt = 0
23-
23+
2424
# create the initial line
2525
self.x = nx.arange(0,2*nx.pi,0.01)
2626
self.line, = p.plot(self.x, nx.sin(self.x), animated=True, lw=2)
27-
27+
2828
self.background = None
29-
29+
3030
def timerEvent(self, evt):
3131
if self.background is None:
3232
self.background = self.canvas.copy_from_bbox(self.ax.bbox)
33-
33+
3434
# restore the clean slate background
3535
self.canvas.restore_region(self.background)
3636
# update the data
37-
self.line.set_ydata(nx.sin(self.x+self.cnt/10.0))
37+
self.line.set_ydata(nx.sin(self.x+self.cnt/10.0))
3838
# just draw the animated artist
3939
self.ax.draw_artist(self.line)
4040
# just redraw the axes rectangle
41-
self.canvas.blit(self.ax.bbox)
42-
41+
self.canvas.blit(self.ax.bbox)
42+
4343
if self.cnt==ITERS:
4444
# print the timing info and quit
4545
print 'FPS:' , ITERS/(time.time()-self.tstart)
4646
sys.exit()
4747

4848
else:
4949
self.cnt += 1
50-
50+
5151
p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs
5252
p.grid() # to ensure proper background restore
5353

examples/animation_blit_tk.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ def run(*args):
2626
# restore the clean slate background
2727
canvas.restore_region(background)
2828
# update the data
29-
line.set_ydata(nx.sin(x+run.cnt/10.0))
29+
line.set_ydata(nx.sin(x+run.cnt/10.0))
3030
# just draw the animated artist
3131
ax.draw_artist(line)
3232
# just redraw the axes rectangle
33-
canvas.blit(ax.bbox)
33+
canvas.blit(ax.bbox)
3434

3535
if run.cnt==1000:
3636
# print the timing info and quit
3737
print 'FPS:' , 1000/(time.time()-tstart)
3838
sys.exit()
3939

4040
run.cnt += 1
41-
run.cnt = 0
41+
run.cnt = 0
4242

4343

4444
p.subplots_adjust(left=0.3, bottom=0.3) # check for flipy bugs

examples/animation_blit_wx.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def update_line(*args):
4646
# restore the clean slate background
4747
canvas.restore_region(update_line.background)
4848
# update the data
49-
line.set_ydata(nx.sin(x+update_line.cnt/10.0))
49+
line.set_ydata(nx.sin(x+update_line.cnt/10.0))
5050
# just draw the animated artist
5151
ax.draw_artist(line)
5252
# just redraw the axes rectangle
@@ -67,7 +67,7 @@ def update_line(*args):
6767

6868
update_line.cnt += 1
6969
wx.WakeUpIdle()
70-
70+
7171

7272

7373
update_line.cnt = 0

examples/annotation_demo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@
124124
verticalalignment='bottom',
125125
clip_on=True, # clip to the axes bounding box
126126
)
127-
127+
128128
ax.set_xlim(-20, 20)
129129
ax.set_ylim(-20, 20)
130130
fig.savefig('annotation_ellipse')
131-
131+
132132

133133

134134
#fig.savefig('annotation_demo.png')

examples/anscombe.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def fit(x):
2525

2626
subplot(221)
2727
plot(x,y1,'ks', xfit, fit(xfit), 'r-', lw=2)
28-
axis([2,20,2,14])
28+
axis([2,20,2,14])
2929
setp(gca(), xticklabels=[], yticks=(4,8,12), xticks=(0,10,20))
3030
text(3,12, 'I', fontsize=20)
3131

examples/axes_demo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
2+
33
from pylab import *
44

55
# create some data to use for the plot
@@ -27,7 +27,7 @@
2727
plot(t[:len(r)], r)
2828
title('Impulse response')
2929
setp(a, xlim=(0,.2), xticks=[], yticks=[])
30-
30+
3131
#savefig('../figures/axes_demo.eps')
3232
#savefig('../figures/axes_demo.png')
3333
show()

examples/axes_props.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
4343
ticklines = ax.get_xticklines()
4444
ticklines.extend( ax.get_yticklines() )
45-
gridlines = ax.get_xgridlines()
45+
gridlines = ax.get_xgridlines()
4646
gridlines.extend( ax.get_ygridlines() )
47-
ticklabels = ax.get_xticklabels()
47+
ticklabels = ax.get_xticklabels()
4848
ticklabels.extend( ax.get_yticklabels() )
4949
5050
for line in ticklines:

examples/clippath_test.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ def __init__(self, ax, line):
1818
ax.add_patch(self.poly)
1919
self.canvas.mpl_connect('button_press_event', self.onpress)
2020
self.canvas.mpl_connect('button_release_event', self.onrelease)
21-
self.canvas.mpl_connect('motion_notify_event', self.onmove)
21+
self.canvas.mpl_connect('motion_notify_event', self.onmove)
2222
self.x, self.y = None, None
2323

2424

2525
def onpress(self, event):
2626
self.x, self.y = event.x, event.y
27-
27+
2828
def onrelease(self, event):
2929
self.x, self.y = None, None
3030

3131
def onmove(self, event):
3232

33-
if self.x is None: return
33+
if self.x is None: return
3434
dx = event.x - self.x
3535
dy = event.y - self.y
3636
self.x, self.y = event.x, event.y
@@ -54,7 +54,7 @@ def _clip(self):
5454
path.close_polygon()
5555
self.line.set_clip_path(path)
5656
self.canvas.draw_idle()
57-
57+
5858

5959
fig = figure(figsize=(8,8))
6060
ax = fig.add_subplot(111)

examples/clippedline.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def set_data(self, *args, **kwargs):
2121
Line2D.set_data(self, *args, **kwargs)
2222
self.xorig = nx.array(self._x)
2323
self.yorig = nx.array(self._y)
24-
24+
2525
def draw(self, renderer):
2626
xlim = self.ax.get_xlim()
2727

@@ -35,8 +35,8 @@ def draw(self, renderer):
3535
else:
3636
self._marker = None
3737
self._linestyle = '-'
38-
39-
38+
39+
4040
Line2D.draw(self, renderer)
4141

4242

@@ -50,5 +50,5 @@ def draw(self, renderer):
5050
ax.set_xlim(10,30)
5151
ax.set_ylim(-1.1,1.1)
5252
show()
53-
54-
53+
54+

examples/colours.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
def pastel(colour, weight=2.4):
1111
""" Convert colour into a nice pastel shade"""
1212
rgb = asarray(colorConverter.to_rgb(colour))
13-
# scale colour
13+
# scale colour
1414
maxc = max(rgb)
1515
if maxc < 1.0 and maxc > 0:
1616
# scale colour

examples/csd_demo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
cnse2 = cnse2[:len(t)]
1818

1919
# two signals with a coherent part and a random part
20-
s1 = 0.01*sin(2*pi*10*t) + cnse1
20+
s1 = 0.01*sin(2*pi*10*t) + cnse1
2121
s2 = 0.01*sin(2*pi*10*t) + cnse2
2222

2323
subplot(211)

examples/cursor_demo.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def __init__(self, ax):
1919

2020
# text location in axes coords
2121
self.txt = ax.text( 0.7, 0.9, '', transform=ax.transAxes)
22-
22+
2323
def mouse_move(self, event):
24-
if not event.inaxes: return
24+
if not event.inaxes: return
2525
ax = event.inaxes
2626
minx, maxx = ax.get_xlim()
2727
miny, maxy = ax.get_ylim()
@@ -48,10 +48,10 @@ def __init__(self, ax, x, y):
4848
self.y = y
4949
# text location in axes coords
5050
self.txt = ax.text( 0.7, 0.9, '', transform=ax.transAxes)
51-
51+
5252
def mouse_move(self, event):
5353

54-
if not event.inaxes: return
54+
if not event.inaxes: return
5555
ax = event.inaxes
5656
minx, maxx = ax.get_xlim()
5757
miny, maxy = ax.get_ylim()
@@ -60,7 +60,7 @@ def mouse_move(self, event):
6060

6161
indx = searchsorted(self.x, [x])[0]
6262
x = self.x[indx]
63-
y = self.y[indx]
63+
y = self.y[indx]
6464
# update the line positions
6565
self.lx.set_data( (minx, maxx), (y, y) )
6666
self.ly.set_data( (x, x), (miny, maxy) )
@@ -74,7 +74,7 @@ def mouse_move(self, event):
7474
ax = subplot(111)
7575

7676
cursor = Cursor(ax)
77-
#cursor = SnaptoCursor(ax, t, s)
77+
#cursor = SnaptoCursor(ax, t, s)
7878
connect('motion_notify_event', cursor.mouse_move)
7979

8080
ax.plot(t, s, 'o')

examples/custom_figure_class.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ def __init__(self, *args, **kwargs):
1919
fig.savefig('test.png')
2020
fig.savefig('test.ps')
2121
show()
22-
22+

examples/dannys_example.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
pylab.yticks((0, 0.5, 1), ('0', '.5', '1'), color = 'k', size = 20)
4141

4242
## Right Y-axis labels
43-
pylab.text(1.05, 0.5, r"\bf{level set} $\phi$", {'color' : 'g', 'fontsize' : 20},
44-
horizontalalignment = 'left',
43+
pylab.text(1.05, 0.5, r"\bf{level set} $\phi$", {'color' : 'g', 'fontsize' : 20},
44+
horizontalalignment = 'left',
4545
verticalalignment = 'center',
4646
rotation = 90,
4747
clip_on = False)

examples/data_helper.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_daily_data():
2828
open, high, low, close, volume
2929
3030
as numeric arrays
31-
31+
3232
"""
3333
class C: pass
3434

@@ -37,7 +37,7 @@ def get_ticker(ticker):
3737
lines = file( 'data/%s.csv' % ticker ).readlines()
3838
for line in lines[1:]:
3939
vals.append([float(val) for val in line.split(',')[1:]])
40-
40+
4141
M = array(vals)
4242
c = C()
4343
c.open = M[:,0]

0 commit comments

Comments
 (0)