#!/usr/bin/gnuplot # 2017-01-17, J. Schwender # Gnuplot Skript zur grafischen Darstellung von Zufallszahlen # Zahlenquelle: random.org # bw = 1000 set terminal png size 1200,800 set output 'random-statistics.png' hist(x,width)=(width*floor(x/width)) set boxwidth bw*0.6 #set xtics 50 #set ytics 50 #set mytics 100 #set grid ytics mytics set size 0.9,0.9 set origin 0.031,0.031 set style fill solid 1 stats 'random-numbers' prefix "A" ; N = A_records; ymax = A_max; ymin = A_min set title sprintf("relative Häufigkeit von %.0f Zufallszahlen [%.0f…%.0f], Klassenbreite: %.0f", N, ymax, ymin, bw) \ font ",18" textcolor rgb 'red' plot 'random-numbers' u (hist($1,bw)):(1.0/N*100.0) smooth freq with boxes title gprintf("N: %.0f", N)