X-Git-Url: http://git.itanic.dy.fi/?p=log-plotter;a=blobdiff_plain;f=bal.plot;fp=bal.plot;h=e580b88d947ca1022d7f878b9b9c0ac0b89fe1fa;hp=df161e65a54a28240e8d7891df05f7e9b9fa969b;hb=d683f195a949f990d96da62caca0ce716d4200b0;hpb=7b5ad11f48c2ff1c9b737110ae0666a2b42ca751 diff --git a/bal.plot b/bal.plot index df161e6..e580b88 100644 --- a/bal.plot +++ b/bal.plot @@ -45,16 +45,16 @@ set grid y 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) - -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; +# 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) + +#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)