X-Git-Url: http://git.itanic.dy.fi/?p=log-plotter;a=blobdiff_plain;f=cell_volt.plot;fp=cell_volt.plot;h=6266962be1ce32f1f9eeadb0d3dc6754e6c7693e;hp=2c102ba501e3d6587278588f0614c5bbeef822f2;hb=d683f195a949f990d96da62caca0ce716d4200b0;hpb=7b5ad11f48c2ff1c9b737110ae0666a2b42ca751 diff --git a/cell_volt.plot b/cell_volt.plot index 2c102ba..6266962 100644 --- a/cell_volt.plot +++ b/cell_volt.plot @@ -49,15 +49,15 @@ set format x "%.0f" set grid y # extract the 'time' cell for xtics -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; +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; # Draw the plot based on log-plotter's variable cell-count if (cell_cnt==1) plot datafile using ($3/60):(($7 > 0 ? $7 : NaN)) axes x1y1 with lines title "Cell 1", \