Mercurial > octave-nkf
comparison doc/interpreter/plotimages.m @ 19825:b254a2e0859c
plotimages.m: Produce the same hist plot for documentation each time (bug #44263)
* plotimages.m: Initialize randn random number generator to known state before
generating data for hist plot.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 20 Feb 2015 08:45:23 -0800 |
parents | 606b05352351 |
children | c3c1fb44f9b5 |
comparison
equal
deleted
inserted
replaced
19824:7eff42dd717d | 19825:b254a2e0859c |
---|---|
37 xlabel ("x"); | 37 xlabel ("x"); |
38 ylabel ("sin (x)"); | 38 ylabel ("sin (x)"); |
39 title ("Simple 2-D Plot"); | 39 title ("Simple 2-D Plot"); |
40 print ([nm "." typ], d_typ); | 40 print ([nm "." typ], d_typ); |
41 elseif (strcmp (nm, "hist")) | 41 elseif (strcmp (nm, "hist")) |
42 rand ("state", 2); | 42 randn ("state", 1); |
43 hist (randn (10000, 1), 30); | 43 hist (randn (10000, 1), 30); |
44 xlabel ("Value"); | 44 xlabel ("Value"); |
45 ylabel ("Count"); | 45 ylabel ("Count"); |
46 title ("Histogram of 10,000 normally distributed random numbers"); | 46 title ("Histogram of 10,000 normally distributed random numbers"); |
47 print ([nm "." typ], d_typ); | 47 print ([nm "." typ], d_typ); |