Skip to content

Commit 588b582

Browse files
committed
e227 e228
Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
1 parent 3074212 commit 588b582

24 files changed

+43
-43
lines changed

examples/event_handling/data_browser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ def update(self):
5252
ax2.cla()
5353
ax2.plot(X[dataind])
5454

55-
ax2.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f'%(xs[dataind], ys[dataind]),
55+
ax2.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f' % (xs[dataind], ys[dataind]),
5656
transform=ax2.transAxes, va='top')
5757
ax2.set_ylim(-0.5, 1.5)
5858
self.selected.set_visible(True)
5959
self.selected.set_data(xs[dataind], ys[dataind])
6060

61-
self.text.set_text('selected: %d'%dataind)
61+
self.text.set_text('selected: %d' % dataind)
6262
fig.canvas.draw()
6363

6464

examples/event_handling/pick_event_demo2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def onpick(event):
2727
for subplotnum, dataind in enumerate(event.ind):
2828
ax = figi.add_subplot(N, 1, subplotnum+1)
2929
ax.plot(X[dataind])
30-
ax.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f'%(xs[dataind], ys[dataind]),
30+
ax.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f' % (xs[dataind], ys[dataind]),
3131
transform=ax.transAxes, va='top')
3232
ax.set_ylim(-0.5, 1.5)
3333
figi.show()

examples/misc/image_thumbnail.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212

1313
if len(sys.argv) != 2:
14-
print('Usage: python %s IMAGEDIR'%__file__)
14+
print('Usage: python %s IMAGEDIR' % __file__)
1515
raise SystemExit
1616
indir = sys.argv[1]
1717
if not os.path.isdir(indir):
18-
print('Could not find input directory "%s"'%indir)
18+
print('Could not find input directory "%s"' % indir)
1919
raise SystemExit
2020

2121
outdir = 'thumbs'
@@ -26,4 +26,4 @@
2626
basedir, basename = os.path.split(fname)
2727
outfile = os.path.join(outdir, basename)
2828
fig = image.thumbnail(fname, outfile, scale=0.15)
29-
print('saved thumbnail of %s to %s'%(fname, outfile))
29+
print('saved thumbnail of %s to %s' % (fname, outfile))

examples/pylab_examples/anscombe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ def fit(x):
5454
# verify the stats
5555
pairs = (x, y1), (x, y2), (x, y3), (x4, y4)
5656
for x, y in pairs:
57-
print('mean=%1.2f, std=%1.2f, r=%1.2f'%(mean(y), std(y), corrcoef(x, y)[0][1]))
57+
print('mean=%1.2f, std=%1.2f, r=%1.2f' % (mean(y), std(y), corrcoef(x, y)[0][1]))
5858

5959
show()

examples/pylab_examples/cursor_demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def mouse_move(self, event):
3131
self.lx.set_ydata(y)
3232
self.ly.set_xdata(x)
3333

34-
self.txt.set_text('x=%1.2f, y=%1.2f'%(x, y))
34+
self.txt.set_text('x=%1.2f, y=%1.2f' % (x, y))
3535
draw()
3636

3737

@@ -63,8 +63,8 @@ def mouse_move(self, event):
6363
self.lx.set_ydata(y)
6464
self.ly.set_xdata(x)
6565

66-
self.txt.set_text('x=%1.2f, y=%1.2f'%(x, y))
67-
print('x=%1.2f, y=%1.2f'%(x, y))
66+
self.txt.set_text('x=%1.2f, y=%1.2f' % (x, y))
67+
print('x=%1.2f, y=%1.2f' % (x, y))
6868
draw()
6969

7070
t = arange(0.0, 1.0, 0.01)

examples/pylab_examples/data_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class C: pass
4040
def get_ticker(ticker):
4141
vals = []
4242

43-
datafile = cbook.get_sample_data('%s.csv'%ticker, asfileobj=False)
43+
datafile = cbook.get_sample_data('%s.csv' % ticker, asfileobj=False)
4444

4545
lines = open(datafile).readlines()
4646
for line in lines[1:]:

examples/pylab_examples/date_demo1.py

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

4545

4646
# format the coords message box
47-
def price(x): return '$%1.2f'%x
47+
def price(x): return '$%1.2f' % x
4848
ax.fmt_xdata = DateFormatter('%Y-%m-%d')
4949
ax.fmt_ydata = price
5050
ax.grid(True)

examples/pylab_examples/finance_work2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def moving_average_convergence(x, nslow=26, nfast=12):
119119
ax1.set_ylim(0, 100)
120120
ax1.set_yticks([30, 70])
121121
ax1.text(0.025, 0.95, 'RSI (14)', va='top', transform=ax1.transAxes, fontsize=textsize)
122-
ax1.set_title('%s daily'%ticker)
122+
ax1.set_title('%s daily' % ticker)
123123

124124
# plot the price and volume data
125125
dx = r.adj_close - r.close
@@ -171,7 +171,7 @@ def moving_average_convergence(x, nslow=26, nfast=12):
171171
ax3.fill_between(r.date, macd-ema9, 0, alpha=0.5, facecolor=fillcolor, edgecolor=fillcolor)
172172

173173

174-
ax3.text(0.025, 0.95, 'MACD (%d, %d, %d)'%(nfast, nslow, nema), va='top',
174+
ax3.text(0.025, 0.95, 'MACD (%d, %d, %d)' % (nfast, nslow, nema), va='top',
175175
transform=ax3.transAxes, fontsize=textsize)
176176

177177
#ax3.set_yticks([])

examples/pylab_examples/image_slices_viewer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def onscroll(self, event):
2626

2727
def update(self):
2828
self.im.set_data(self.X[:, :, self.ind])
29-
ax.set_ylabel('slice %s'%self.ind)
29+
ax.set_ylabel('slice %s' % self.ind)
3030
self.im.axes.figure.canvas.draw()
3131

3232

examples/pylab_examples/manual_axis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def make_xaxis(ax, yloc, offset=0.05, **props):
2323
tickline.set_clip_on(False)
2424
axline.set_clip_on(False)
2525
for loc in locs:
26-
ax.text(loc, yloc-offset, '%1.1f'%loc,
26+
ax.text(loc, yloc-offset, '%1.1f' % loc,
2727
horizontalalignment='center',
2828
verticalalignment='top')
2929

@@ -39,7 +39,7 @@ def make_yaxis(ax, xloc=0, offset=0.05, **props):
3939
axline.set_clip_on(False)
4040

4141
for loc in locs:
42-
ax.text(xloc-offset, loc, '%1.1f'%loc,
42+
ax.text(xloc-offset, loc, '%1.1f' % loc,
4343
verticalalignment='center',
4444
horizontalalignment='right')
4545

0 commit comments

Comments
 (0)