Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
  • Loading branch information
twmr committed Nov 9, 2014
1 parent 3036128 commit 9c6bac3
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/pylab_examples/contour_image.py
Expand Up @@ -24,7 +24,7 @@
Z = (Z1 - Z2) * 10

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

norm = cm.colors.Normalize(vmax=abs(Z).max(), vmin=-abs(Z).max())
cmap = cm.PRGn
Expand Down
2 changes: 1 addition & 1 deletion examples/pylab_examples/demo_agg_filter.py
Expand Up @@ -11,7 +11,7 @@ def smooth1d(x, window_len):
s = np.r_[2*x[0] - x[window_len:1:-1], x, 2*x[-1] - x[-1:-window_len:-1]]
w = np.hanning(window_len)
y = np.convolve(w/w.sum(), s, mode='same')
return y[window_len - 1 : -window_len + 1]
return y[window_len-1:-window_len+1]


def smooth2d(A, sigma=3):
Expand Down
3 changes: 1 addition & 2 deletions examples/pylab_examples/pie_demo2.py
Expand Up @@ -44,11 +44,10 @@

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

# Turn off shadow for tiny plot with exploded slice.
patches, texts, autotexts = plt.pie(fracs, explode=explode,
labels=labels, autopct='%.0f%%',
shadow=False, radius=0.5)
# Turn off shadow for tiny plot
# with exploded slice.
for t in texts:
t.set_size('smaller')
for t in autotexts:
Expand Down
5 changes: 4 additions & 1 deletion examples/pylab_examples/stackplot_demo.py
@@ -1,7 +1,10 @@
import numpy as np
from matplotlib import pyplot as plt

fnx = lambda: np.random.randint(5, 50, 10)

def fnx():
return np.random.randint(5, 50, 10)

y = np.row_stack((fnx(), fnx(), fnx()))
x = np.arange(10)

Expand Down
2 changes: 1 addition & 1 deletion examples/pylab_examples/usetex_demo.py
Expand Up @@ -13,7 +13,7 @@
X, X < 0, 'k--', # sharp interface
linewidth=5)

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

ltext = pylab.gca().get_legend().get_texts()
Expand Down
2 changes: 1 addition & 1 deletion examples/user_interfaces/interactive2.py
Expand Up @@ -169,7 +169,7 @@ def __init__(self):

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

# setup colors
# setup colors
self.style_banner = gtk.TextTag("banner")
self.style_banner.set_property("foreground", "saddle brown")

Expand Down

0 comments on commit 9c6bac3

Please sign in to comment.