Skip to content

Commit

Permalink
Remove unnecessary second histogram
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysyu committed Sep 29, 2013
1 parent fc2ab07 commit e57b5fc
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions examples/pylab_examples/histogram_demo_cumulative.py
Expand Up @@ -11,17 +11,6 @@
y /= y[-1]
plt.plot(bins, y, 'k--', linewidth=1.5)

# Create a second data-set with a smaller standard deviation.
sigma2 = 15.
x = mu + sigma2*np.random.randn(10000)

n, bins, patches = plt.hist(x, bins=bins, normed=1, histtype='step', cumulative=True)

# Add a line showing the expected distribution.
y = mlab.normpdf( bins, mu, sigma2).cumsum()
y /= y[-1]
plt.plot(bins, y, 'r--', linewidth=1.5)

# Overlay a reverted cumulative histogram.
n, bins, patches = plt.hist(x, bins=bins, normed=1,
histtype='step', cumulative=-1)
Expand Down

0 comments on commit e57b5fc

Please sign in to comment.