Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e57b5fc

Browse files
committed
Remove unnecessary second histogram
1 parent fc2ab07 commit e57b5fc

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

examples/pylab_examples/histogram_demo_cumulative.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,6 @@
1111
y /= y[-1]
1212
plt.plot(bins, y, 'k--', linewidth=1.5)
1313

14-
# Create a second data-set with a smaller standard deviation.
15-
sigma2 = 15.
16-
x = mu + sigma2*np.random.randn(10000)
17-
18-
n, bins, patches = plt.hist(x, bins=bins, normed=1, histtype='step', cumulative=True)
19-
20-
# Add a line showing the expected distribution.
21-
y = mlab.normpdf( bins, mu, sigma2).cumsum()
22-
y /= y[-1]
23-
plt.plot(bins, y, 'r--', linewidth=1.5)
24-
2514
# Overlay a reverted cumulative histogram.
2615
n, bins, patches = plt.hist(x, bins=bins, normed=1,
2716
histtype='step', cumulative=-1)

0 commit comments

Comments
 (0)