File: random.dem

package info (click to toggle)
gnuplot 4.0.0-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,396 kB
  • ctags: 6,623
  • sloc: ansic: 63,562; lisp: 5,011; cpp: 970; sh: 900; makefile: 756; objc: 647; asm: 539; csh: 297; awk: 235; pascal: 192; perl: 44
file content (33 lines) | stat: -rw-r--r-- 764 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#
# $Id: random.dem,v 1.8 2004/02/13 01:16:39 sfeam Exp $
#
# random.dem
#
# Lattice test for random numbers;
# If you can see any patterns in this plot, the random number generator
# is not very good.
#
# Copyright (c) 1991, Jos van der Woude, jvdwoude@hut.nl
unset key
set xrange [0: 1]
set yrange [0: 1]
set zrange [0: 1]
set title "Lattice test for random numbers"
set xlabel "rand(n) ->"
set ylabel "rand(n + 1) ->"
set zlabel "rand(n + 2) ->"
set format x "%3.2f"
set format y "%3.2f"
set format z "%3.2f"
set tics
set sample 1000
set style function dots
set parametric
plot rand(0), rand(0)
pause -1 "Hit return to continue"
print "3D plot ahead, one moment please ..."
set sample 50
splot rand(0), rand(0), rand(0)
pause -1 "Hit return to continue"

reset