Made graphs nicer by using gnuplot's mulitplot functionality, added power graph

This commit is contained in:
adamdunkels 2008-01-08 08:06:41 +00:00
parent 12bbe80003
commit bfd894c7bd

View file

@ -1,122 +1,241 @@
set terminal postscript eps color font "Helvetica" 16 set terminal postscript eps color font "Helvetica" 10
set xlabel "Time" set xlabel "Time"
set xdata time set xdata time
set timefmt "%s" set timefmt "%s"
#set datafile separator " " #set datafile separator " "
#set boxwidth 0.15 #set boxwidth 0.15
set style fill pattern 1 #set style fill pattern 1
set style data lines set style data lines
set key top left Left #width -3 set key top left Left #width -3
set output "plot-battery.eps" set output "plot-rssi.eps"
set ylabel "Battery level" set ylabel "Radio noise level"
plot [:] [0:] \ plot [:] [0:] \
'data' using 1:($9/4096 * 1.5) title "Battery level" 'data' using 1:9 notitle
set output "plot-energy.eps" #set output "plot-energy.eps"
set ylabel "Energy (mJ)" #set ylabel "Energy (mJ)"
#plot 'data' using 1:\
plot 'data' using 1:\ #(3*(0.0545 * $13 + 1.8 * $14 + 20.0 * $15 + 17.7 * $16 + 4.6 * $17) / 4096) \
((0.0545 * $13 + 1.8 * $14 + 20.0 * $15 + 17.7 * $16 + 4.6 * $17) / 4096) \ #title "Red LED" with filledcurves x1, \
title "Red LED" with filledcurves x1, \ #'data' using 1:\
'data' using 1:\ #(3*(0.0545 * $13 + 1.8 * $14 + 20.0 * $15 + 17.7 * $16) / 4096) \
((0.0545 * $13 + 1.8 * $14 + 20.0 * $15 + 17.7 * $16) / 4096) \ #title "Radio TX" with filledcurves x1, \
title "Radio TX" with filledcurves x1, \ #'data' using 1:\
'data' using 1:\ #(3*(0.0545 * $13 + 1.8 * $14 + 20.0 * $15) / 4096) \
((0.0545 * $13 + 1.8 * $14 + 20.0 * $15) / 4096) \ #title "Radio listen" with filledcurves x1, \
title "Radio listen" with filledcurves x1, \ #'data' using 1:\
'data' using 1:\ #(3*(0.0545 * $13 + 1.8 * $14) / 4096) \
((0.0545 * $13 + 1.8 * $14) / 4096) \ #title "CPU active" with filledcurves x1, \
title "CPU active" with filledcurves x1, \ #'data' using 1:\
'data' using 1:\ #(3*(0.0545 * $13) / 4096) \
((0.0545 * $13) / 4096) \ #title "CPU LPM" with filledcurves x1
title "CPU LPM" with filledcurves x1
set output "plot-temperature.eps" set output "plot-power.eps"
set ylabel "Temperature (degrees Celcius)" set ylabel "Power (mW)"
plot 'power' using 1:\
(3*(0.0545 * $2 + 1.8 * $3 + 20.0 * $4 + 17.7 * $5 + 4.6 * $6) / 4096) \
title "Radio listen" with filledcurve x1, \
'power' using 1:\
(3*(0.0545 * $2 + 1.8 * $3 + 4.6 * $6 + 17.7 * $5) / 4096) \
title "Radio TX" with filledcurve x1, \
'power' using 1:\
(3*(0.0545 * $2 + 1.8 * $3 + 4.6 * $6) / 4096) \
title "Red LED" with filledcurve x1, \
'power' using 1:\
(3*(0.0545 * $2 + 1.8 * $3) / 4096) \
title "CPU active" with filledcurve x1, \
'power' using 1:\
(3*(0.0545 * $2) / 4096) \
title "CPU LPM" with filledcurve x1
plot [:] [-10:30] \ #set output "plot-temperature.eps"
'data' using 1:(-39.60 + 0.01*$7) title "Temperature" #set ylabel "Temperature\n(degrees Celcius)"
#plot [:] [-10:30] \
#'data' using 1:(-39.60 + 0.01*$7) title "Temperature"
set output "plot-humidity.eps"
set ylabel "Humidity"
plot [:] [0:100] \
'data' using 1:(-4 + 0.0405*$8 - 2.8e-6*($8*$8)) title "Humidity"
#set output "plot-humidity.eps"
#set ylabel "Humidity"
#plot [:] [0:100] \
#'data' using 1:(-4 + 0.0405*$8 - 2.8e-6*($8*$8)) title "Humidity"
set output "plot-sensors.eps" set output "plot-sensors.eps"
set ylabel "Sensed value" set multiplot
set size 1, 0.25
plot [:] [-10:200] \ set origin 0, 0.75
'data' using 1:(0.625 * 1000000 * 0.5 * $5/4096 / 100000 * 1000) title "Light 1", \ unset xlabel
'data' using 1:(0.769 * 100000 * 2.5 * $6/4096 / 100000 * 1000) title "Light 2", \ set ylabel "Light sensor 1"
'data' using 1:(-39.60 + 0.01*$7) title "Temperature", \
'data' using 1:(-4 + 0.0405*$8 - 2.8e-6*($8*$8)) title "Humidity"
set output "plot-light.eps"
set ylabel "Light"
plot [:] [0:] \ plot [:] [0:] \
'data' using 1:(0.625 * 1000000 * 0.5 * $5/4096 / 100000 * 1000) title "Light 1", \ 'data' using ($1 - $36/4096):(0.625 * 1000000 * 0.5 * $5/4096 / 100000 * 1000) notitle
'data' using 1:(0.769 * 100000 * 2.5 * $6/4096 / 100000 * 1000) title "Light 2" set origin 0, 0.5
set ylabel "Light sensor 2"
plot [:] [0:] \
'data' using ($1 - $36/4096):(0.769 * 100000 * 2.5 * $6/4096 / 100000 * 1000) notitle
set origin 0, 0.25
set ylabel "Temperature (degrees C)"
plot [:] [0:] \
'data' using ($1 - $36/4096):(-39.60 + 0.01*$7) notitle
set origin 0, 0.
set ylabel "Relative humidity"
set xlabel "Time"
plot [:] [0:100] \
'data' using ($1 - $36/4096):(-4 + 0.0405*$8 - 2.8e-6*($8*$8)) notitle
unset multiplot
set size 1,1
set origin 0,0
#set output "plot-light.eps"
#set ylabel "Light"
#plot [:] [0:] \
#'data' using 1:(0.625 * 1000000 * 0.5 * $5/4096 / 100000 * 1000) title "Light 1", \
#'data' using 1:(0.769 * 100000 * 2.5 * $6/4096 / 100000 * 1000) title "Light 2"
set output "plot-ll-errors.eps" set output "plot-ll-errors.eps"
set ylabel "Errors per packet" set multiplot
set size 1, 0.17
plot [:] [0:1] \ set origin 0, 0.0
'data' using 1:($31 / $33) title "contentiondrop per tx", \ set ylabel "contentiondrop"
'data' using 1:($32 / $33) title "sendingdrop per tx", \ plot [:] [0:] \
'data' using 1:($27 / $34) title "toolong per rx",\ 'data' using 1:($31) with steps notitle
'data' using 1:($28 / $34)title "tooshort per rx",\ set origin 0, 0.17
'data' using 1:($29 / $34) title "badsynch per rx",\ set ylabel "sendingdrop"
'data' using 1:($30 / $34) title "badcrc per rx" unset xlabel
plot [:] [0:] \
'data' using 1:($32) with steps notitle
set origin 0, 0.34
set ylabel "toolong"
plot [:] [0:] \
'data' using 1:($27) with steps notitle
set origin 0, 0.50
set ylabel "tooshort"
plot [:] [0:] \
'data' using 1:($28) with steps notitle
set origin 0, 0.67
set ylabel "badsynch"
plot [:] [0:] \
'data' using 1:($29) with steps notitle
set origin 0, 0.84
set ylabel "badcrc"
plot [:] [0:] \
'data' using 1:($30) with steps notitle
unset multiplot
set size 1,1
set origin 0,0
set xlabel "Time"
set output "plot-parent.eps" set output "plot-parent.eps"
set ylabel "Node ID" set ylabel "Node ID"
plot [:] [0:100] \ plot [:] [0:100] \
'data' using 1:10 title "Best parent" with points 'data' using 1:10 title "Best parent" with points
set output "plot-rtmetric.eps" set output "plot-rtmetric.eps"
set multiplot
unset xlabel
set size 1, 0.2
set origin 0, 0.8
set ylabel "Routing metric" set ylabel "Routing metric"
plot [:] [0:8] \
plot [:] [0:] \ 'data' using 1:(($11 + $12) / 16) notitle with steps
'data' using 1:(($11 + $12) / 16) title "Routing metric" with steps, \ set origin 0, 0.2
'data' using 1:(($11) / 16) title "ETX to best neighbor" with steps, \ set ylabel "ETX to\nbest neighbor"
'data' using 1:(($12) / 16) title "Rtmetric for best neighbor" with steps, \ plot [:] [0:8] \
'lost' using 1:($2 * 0.5) title "Lost packet" with points 'data' using 1:(($11) / 16) notitle with steps
set ylabel "Rtmetric for\nbest neighbor"
set origin 0, 0.4
plot [:] [0:8] \
'data' using 1:(($12) / 16) notitle with steps
set ylabel "Lost packet"
set origin 0, 0.0
set xlabel "Time"
plot [:] [0:1] \
'lost' using 1:($2 * 0.5) notitle with points
set ylabel "Hops"
unset xlabel
set origin 0, 0.6
plot [:] [0:8] \
'data' using 1:4 notitle with steps
unset multiplot
set size 1,1
set origin 0,0
set xlabel "Time"
set output "plot-rtx-stats.eps" set output "plot-rtx-stats.eps"
set ylabel "Ratio" set multiplot
unset xlabel
set size 1, 0.17
set origin 0, 0.84
set ylabel "reliabletx"
plot [:] [0:] \
'data' using 1:($20) notitle
set origin 0, 0.67
set ylabel "reliablerx"
plot [:] [0:] \
'data' using 1:($21) notitle
set origin 0, 0.50
set ylabel "rexmit"
plot [:] [0:] \
'data' using 1:($22) notitle
set origin 0, 0.34
set ylabel "acktx"
plot [:] [0:] \
'data' using 1:($23) notitle
set origin 0, 0.17
set ylabel "timedout"
plot [:] [0:] \
'data' using 1:($25) notitle
set origin 0, 0.0
set xlabel "Time"
set ylabel "badackrx"
plot [:] [0:] \
'data' using 1:($26) notitle
unset multiplot
set size 1,1
set origin 0,0
set xlabel "Time"
plot \ set output "plot-tx-stats.eps"
'data' using 1:($20 / $18) title "reliabletx per tx",\ set multiplot
'data' using 1:($21 / $19) title "reliablerx per rx",\ unset xlabel
'data' using 1:($22 / $20) title "rexmit per rtx",\ set size 1, 0.25
'data' using 1:($23 / $21) title "acktx per rrx",\ set origin 0, 0.75
'data' using 1:($24 / $21) title "noacktx per rrx",\ set ylabel "tx"
'data' using 1:($25 / $20) title "timedout per rtx",\ plot [:] [0:] \
'data' using 1:($26 / $20) title "badackrx per rtx" 'data' using 1:($18) notitle
set origin 0, 0.50
set ylabel "reliabletx"
plot [:] [0:] \
'data' using 1:($20) notitle
set origin 0, 0.25
set ylabel "rx"
plot [:] [0:] \
'data' using 1:($19) notitle
set origin 0, 0.0
set xlabel "Time"
set ylabel "reliablerx"
plot [:] [0:] \
'data' using 1:($21) notitle
unset multiplot
set size 1,1
set origin 0,0
set xlabel "Time"
set output "plot-seqno.eps" set output "plot-seqno.eps"
set ylabel "Sequence number" set ylabel "Sequence number"
plot [:] [0:256] \ plot [:] [0:256] \
'data' using 1:3 title "Sequence number" with steps, \ 'data' using 1:3 title "Sequence number" with steps, \
'lost' using 1:($2 * 128) title "Lost" with points, \ 'lost' using 1:($2 * 128) title "Lost" with points, \
'dup' using 1:($2 * 64) title "Duplicate" with points, \ 'dup' using 1:($2 * 64) title "Duplicate" with points, \
'parent' using 1:2 title "Best parent" with points 'parent' using 1:2 title "Best parent" with points
#set output "plot-hops.eps"
#set ylabel "Hops"
#plot [:] [-1:5] \
#'data' using 1:4 title "Hops" with steps
set output "plot-hops.eps" set output "plot-latency.eps"
set ylabel "Hops" set ylabel "Latency (s)"
plot [:] [:] \
plot [:] [-1:5] \ 'data' using 1:($36 / 4096) title "Latency" with steps, \
'data' using 1:4 title "Hops" with steps 'data' using 1:($36 / ($4 * 4096)) title "Latency per hop" with steps