set xlabel "Time [minutes]"
set format x "%.0f"
-# extract the 'time' cell for xtics based on tital time
-stats datafile every ::::0 using 3 nooutput
-time = int(STATS_min)
+# extract the 'time' cell for xtics
+stats datafile nooutput
+stats datafile u (lastdatapoint=$3) every ::STATS_records-1::STATS_records-1 nooutput
+time= int(STATS_max)
-if (time <= 120) set xtics 0.5 nomirror;
-if (time <= 300) set xtics 1 nomirror;
-if (time <= 900) set xtics 2 nomirror;
-if (time <= 1200) set xtics 3 nomirror;
-if (time <= 1800) set xtics 5 nomirror;
-if (time > 1800) set xtics 10 nomirror;
+#set xtics based on elapsed time
+set xtics 1 nomirror
+if (time > 300) set xtics 1 nomirror;
+if (time > 900) set xtics 2 nomirror;
+if (time > 1800) set xtics 5 nomirror;
# Count average-value for balance sero-line
samples(x) = $0 > 4 ? 5 : ($0+1)
# Draw the plot based on log-plotter's variable cell-count
if (cell_cnt==1) plot sum=init(0), \
- datafile using ($3/60):(avg5($7 - ($7 + $8) / cell_cnt)*100) with lines title "Cell 1";
+ datafile using ($3/60):(avg5($7 - ($7 + $8) / cell_cnt)*1000) with lines title "Cell 1";
if (cell_cnt==2) plot sum=init(0), \
- datafile using ($3/60):(avg5($7 - ($7 + $8) / cell_cnt)*100) with lines title "Cell 1", \
- datafile using ($3/60):(avg5($8 - ($7 + $8) / cell_cnt)*100) with lines title "Cell 2";
+ datafile using ($3/60):(avg5($7 - ($7 + $8) / cell_cnt)*1000) with lines title "Cell 1", \
+ datafile using ($3/60):(avg5($8 - ($7 + $8) / cell_cnt)*1000) with lines title "Cell 2";
if (cell_cnt==3) plot sum=init(0), \
- datafile using ($3/60):(avg5($7 - ($7 + $8 + $9) / cell_cnt)*100) with lines title "Cell 1", \
- datafile using ($3/60):(avg5($8 - ($7 + $8 + $9) / cell_cnt)*100) with lines title "Cell 2", \
- datafile using ($3/60):(avg5($9 - ($7 + $8 + $9) / cell_cnt)*100) with lines title "Cell 3";
+ datafile using ($3/60):(avg5($7 - ($7 + $8 + $9) / cell_cnt)*1000) with lines title "Cell 1", \
+ datafile using ($3/60):(avg5($8 - ($7 + $8 + $9) / cell_cnt)*1000) with lines title "Cell 2", \
+ datafile using ($3/60):(avg5($9 - ($7 + $8 + $9) / cell_cnt)*1000) with lines title "Cell 3";
if (cell_cnt==4) plot sum=init(0), \
- datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10) / cell_cnt)*100) with lines title "Cell 1", \
- datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10) / cell_cnt)*100) with lines title "Cell 2", \
- datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10) / cell_cnt)*100) with lines title "Cell 3", \
- datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10) / cell_cnt)*100) with lines title "Cell 4";
+ datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10) / cell_cnt)*1000) with lines title "Cell 1", \
+ datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10) / cell_cnt)*1000) with lines title "Cell 2", \
+ datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10) / cell_cnt)*1000) with lines title "Cell 3", \
+ datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10) / cell_cnt)*1000) with lines title "Cell 4";
if (cell_cnt==5) plot sum=init(0), \
- datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11) / cell_cnt)*100) with lines title "Cell 1", \
- datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11) / cell_cnt)*100) with lines title "Cell 2", \
- datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11) / cell_cnt)*100) with lines title "Cell 3", \
- datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11) / cell_cnt)*100) with lines title "Cell 4", \
- datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11) / cell_cnt)*100) with lines title "Cell 5";
+ datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11) / cell_cnt)*1000) with lines title "Cell 1", \
+ datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11) / cell_cnt)*1000) with lines title "Cell 2", \
+ datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11) / cell_cnt)*1000) with lines title "Cell 3", \
+ datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11) / cell_cnt)*1000) with lines title "Cell 4", \
+ datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11) / cell_cnt)*1000) with lines title "Cell 5";
if (cell_cnt==6) plot sum=init(0), \
- datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*100) with lines title "Cell 1", \
- datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*100) with lines title "Cell 2", \
- datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*100) with lines title "Cell 3", \
- datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*100) with lines title "Cell 4", \
- datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*100) with lines title "Cell 5", \
- datafile using ($3/60):(avg5($12 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*100) with lines title "Cell 6";
+ datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*1000) with lines title "Cell 1", \
+ datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*1000) with lines title "Cell 2", \
+ datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*1000) with lines title "Cell 3", \
+ datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*1000) with lines title "Cell 4", \
+ datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*1000) with lines title "Cell 5", \
+ datafile using ($3/60):(avg5($12 - ($7 + $8 + $9 + $10 + $11 + $12) / cell_cnt)*1000) with lines title "Cell 6";
if (cell_cnt==7) plot sum=init(0), \
- datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*100) with lines title "Cell 1", \
- datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*100) with lines title "Cell 2", \
- datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*100) with lines title "Cell 3", \
- datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*100) with lines title "Cell 4", \
- datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*100) with lines title "Cell 5", \
- datafile using ($3/60):(avg5($12 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*100) with lines title "Cell 6", \
- datafile using ($3/60):(avg5($13 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*100) with lines title "Cell 7";
+ datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*1000) with lines title "Cell 1", \
+ datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*1000) with lines title "Cell 2", \
+ datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*1000) with lines title "Cell 3", \
+ datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*1000) with lines title "Cell 4", \
+ datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*1000) with lines title "Cell 5", \
+ datafile using ($3/60):(avg5($12 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*1000) with lines title "Cell 6", \
+ datafile using ($3/60):(avg5($13 - ($7 + $8 + $9 + $10 + $11 + $12 + $13) / cell_cnt)*1000) with lines title "Cell 7";
if (cell_cnt==8) plot sum=init(0), \
- datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*100) with lines title "Cell 1", \
- datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*100) with lines title "Cell 2", \
- datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*100) with lines title "Cell 3", \
- datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*100) with lines title "Cell 4", \
- datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*100) with lines title "Cell 5", \
- datafile using ($3/60):(avg5($12 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*100) with lines title "Cell 6", \
- datafile using ($3/60):(avg5($13 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*100) with lines title "Cell 7", \
- datafile using ($3/60):(avg5($14 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*100) with lines title "Cell 8";
+ datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*1000) with lines title "Cell 1", \
+ datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*1000) with lines title "Cell 2", \
+ datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*1000) with lines title "Cell 3", \
+ datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*1000) with lines title "Cell 4", \
+ datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*1000) with lines title "Cell 5", \
+ datafile using ($3/60):(avg5($12 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*1000) with lines title "Cell 6", \
+ datafile using ($3/60):(avg5($13 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*1000) with lines title "Cell 7", \
+ datafile using ($3/60):(avg5($14 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14) / cell_cnt)*1000) with lines title "Cell 8";
if (cell_cnt==9) plot sum=init(0), \
- datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*100) with lines title "Cell 1", \
- datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*100) with lines title "Cell 2", \
- datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*100) with lines title "Cell 3", \
- datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*100) with lines title "Cell 4", \
- datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*100) with lines title "Cell 5", \
- datafile using ($3/60):(avg5($12 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*100) with lines title "Cell 6", \
- datafile using ($3/60):(avg5($13 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*100) with lines title "Cell 7", \
- datafile using ($3/60):(avg5($14 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*100) with lines title "Cell 8", \
- datafile using ($3/60):(avg5($15 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*100) with lines title "Cell 9";
+ datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*1000) with lines title "Cell 1", \
+ datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*1000) with lines title "Cell 2", \
+ datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*1000) with lines title "Cell 3", \
+ datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*1000) with lines title "Cell 4", \
+ datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*1000) with lines title "Cell 5", \
+ datafile using ($3/60):(avg5($12 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*1000) with lines title "Cell 6", \
+ datafile using ($3/60):(avg5($13 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*1000) with lines title "Cell 7", \
+ datafile using ($3/60):(avg5($14 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*1000) with lines title "Cell 8", \
+ datafile using ($3/60):(avg5($15 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15) / cell_cnt)*1000) with lines title "Cell 9";
if (cell_cnt==10) plot sum=init(0), \
- datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*100) with lines title "Cell 1", \
- datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*100) with lines title "Cell 2", \
- datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*100) with lines title "Cell 3", \
- datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*100) with lines title "Cell 4", \
- datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*100) with lines title "Cell 5", \
- datafile using ($3/60):(avg5($12 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*100) with lines title "Cell 6", \
- datafile using ($3/60):(avg5($13 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*100) with lines title "Cell 7", \
- datafile using ($3/60):(avg5($14 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*100) with lines title "Cell 8", \
- datafile using ($3/60):(avg5($15 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*100) with lines title "Cell 9", \
- datafile using ($3/60):(avg5($16 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*100) with lines title "Cell 10";
+ datafile using ($3/60):(avg5($7 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*1000) with lines title "Cell 1", \
+ datafile using ($3/60):(avg5($8 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*1000) with lines title "Cell 2", \
+ datafile using ($3/60):(avg5($9 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*1000) with lines title "Cell 3", \
+ datafile using ($3/60):(avg5($10 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*1000) with lines title "Cell 4", \
+ datafile using ($3/60):(avg5($11 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*1000) with lines title "Cell 5", \
+ datafile using ($3/60):(avg5($12 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*1000) with lines title "Cell 6", \
+ datafile using ($3/60):(avg5($13 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*1000) with lines title "Cell 7", \
+ datafile using ($3/60):(avg5($14 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*1000) with lines title "Cell 8", \
+ datafile using ($3/60):(avg5($15 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*1000) with lines title "Cell 9", \
+ datafile using ($3/60):(avg5($16 - ($7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16) / cell_cnt)*1000) with lines title "Cell 10";