8000 minor fixes · matplotlib/matplotlib@9c6bac3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9c6bac3

Browse files
committed
minor fixes
Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
1 parent 3036128 commit 9c6bac3

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

examples/pylab_examples/contour_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
Z = (Z1 - Z2) * 10
2525

2626
levels = arange(-2.0, 1.601, 0.4) # Boost the upper limit to avoid truncation
27-
# errors.
27+
# errors.
2828

2929
norm = cm.colors.Normalize(vmax=abs(Z).max(), vmin=-abs(Z).max())
3030
cmap = cm.PRGn

examples/pylab_examples/demo_agg_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def smooth1d(x, window_len):
1111
s = np.r_[2*x[0] - x[window_len:1:-1], x, 2*x[-1] - x[-1:-window_len:-1]]
1212
w = np.hanning(window_len)
1313
y = np.convolve(w/w.sum(), s, mode='same')
14-
return y[window_len - 1 : -window_len + 1]
14+
return y[window_len-1:-window_len+1]
1515

1616

1717
def smooth2d(A, sigma=3):

examples/pylab_examples/pie_demo2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@
4444

4545
plt.subplot(the_grid[1, 1], aspect=1)
4646

47+
# Turn off shadow for tiny plot with exploded slice.
4748
patches, texts, autotexts = plt.pie(fracs, explode=explode,
4849
labels=labels, autopct='%.0f%%',
4950
shadow=False, radius=0.5)
50-
# Turn off shadow for tiny plot
51-
# with exploded slice.
5251
for t in texts:
5352
t.set_size('smaller')
5453
for t in autotexts:

examples/pylab_examples/stackplot_demo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import numpy as np
22
from matplotlib import pyplot as plt
33

4-
fnx = lambda: np.random.randint(5, 50, 10)
4+
5+
def fnx():
6+
return np.random.randint(5, 50, 10)
7+
58
y = np.row_stack((fnx(), fnx(), fnx()))
69
x = np.arange(10)
710

examples/pylab_examples/usetex_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
X, X < 0, 'k--', # sharp interface
1414
linewidth=5)
1515

16-
## legend
16+
# legend
1717
pylab.legend((r'phase field', r'level set', r'composition', r'sharp interface'), shadow=True, loc=(0.01, 0.55))
1818

1919
ltext = pylab.gca().get_legend().get_texts()

examples/user_interfaces/interactive2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def __init__(self):
169169

170170
self.mark = self.text.get_buffer().create_mark("End", self.text.get_buffer().get_end_iter(), False)
171171

172-
# setup colors
172+
# setup colors
173173
self.style_banner = gtk.TextTag("banner")
174174
self.style_banner.set_property("foreground", "saddle brown")
175175

0 commit comments

Comments
 (0)
0