1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-12-27 04:23:20 +02:00
wernermisc/m1rc3/norruption/1/plot

20 lines
710 B
Plaintext
Raw Normal View History

#!/bin/sh
gnuplot <<EOF
set term postscript color eps enhanced solid lw 2 20
set output "out.eps"
set title "Probability distribution of time between NOR corruptions"
set xlabel "Power cycles"
set ylabel "Cumulative probability"
set key bottom
plot "< sed '1,/^\$/d' GRAPH | sort -n" using 1:((\$0+1)/12) with lines \
title "First corruption observed", \
"< sed '/^\$/q' GRAPH | sort -n" using 1:((\$0+1)/12) with lines \
title "Last non-corruption observed", \
1-exp(-0.0021*x) with lines \
title "Exponential distribution ({/Symbol l}=1/476)"
EOF
cat out.eps |
gs -sDEVICE=ppmraw -r100 -sOutputFile=- \
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sPAPERSIZE=a4 -q - | \
convert -trim - out.png