Skip to content

Commit 70149d6

Browse files
committed
boxplot demo 2: set random seed so plots are identical
svn path=/trunk/matplotlib/; revision=8033
1 parent 506f26c commit 70149d6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/pylab_examples/boxplot_demo2.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
randomDists = ['Normal(1,1)',' Lognormal(1,1)', 'Exp(1)', 'Gumbel(6,4)',
1717
'Triangular(2,9,11)']
1818
N = 500
19+
20+
np.random.seed(3) # make identical plots each time
21+
1922
norm = np.random.normal(1,1, N)
2023
logn = np.random.lognormal(1,1, N)
2124
expo = np.random.exponential(1, N)

0 commit comments

Comments
 (0)