not a correct time display in gnuplot -


i started gnuplot , have problem using "time" x-variable. have tried lot of things cannot right. data looks like

#  10-05-2013 1-52-56, 425,"lvl"   10-05-2013 1-52-57, 425,"lvl"   10-05-2013 1-52-58, 433,"lvl"   10-05-2013 1-52-59, 433,"lvl"   

i want plot values (425 etc) y , date/time x (this date/time example uses date starting 1 (e.g. 1 am) instead of 01 same problem occurs time e.g. 19 hours). 1-52-56 means 1 hour, 52 minutes , 56 seconds.

this part of script use (the dataset build "on fly"):


# maak een lege plot zodat je verderop replot kunt gebruiken load "gnuvars.txt" set xrange [0:1] set yrange [0:1] set xtics rotate set xtics font "0,9" #set terminal wxt size 1000,700 #set terminal windows size 1150,830 set terminal windows size 1150,500 set terminal windows position 1,1 plot 1/0 notitle  # zet eerst een lege commentaarregel in ylsecout.txt # in deze file komen de uiteindel te plotten waarden te staan system ("echo # > d:\\curl\\ylsecout.txt") # maak een loopje on een (nu nog van tevoren bepaald) aantal iteraties [i=0:nr_its]{     #     #lees na een aantal seconden de youless 1x uit en zet dat in het bestand ylsec.txt     system ("timeout /t 1")     system ("d:\\curl\\curl -c d:\\curl\\cookie.txt 192.168.178.14/l?w=password")      system ("d:\\curl\\curl -b d:\\curl\\cookie.txt 192.168.178.14/a?f=j -s -s >  d:\\curl\\ylsec.txt")     #system ("echo. \>\>d:\\curl\\ylsec.txt")     #lees datum, tijd uit en maak een plotbare datafile ylsecout.txt     system ("call d:\\curl\\maakplotdata")     # en maak een replot     set title 'meetwaarden youless versus tijd'     #set xlabel 'time/s'     #set ylabel 'waarden'     set grid xtics     set autoscale     set xdata time     set timefmt "%d-%m-%y %h-%m-%s"     set datafile separator ","     replot 'ylsecout.txt' using 1:2 notitle lines lw 3 lt rgb "red" } 

i incoprorated entire code because perhaps wrote on beforehand messes graph, assume problem lies within:

set xdata time set timefmt "%d-%m-%y %h-%m-%s" 

the plot uses labels incorporate minutes , seconds, not hours or date. can not right. please @ , tell me waht doing wrong?

thanks!

the plot uses labels incorporate minutes , seconds, not hours or date.

the format of xtic labels can changed set format x '<format>', e.g. include date , hours use:

set format x '%d/%m - %h:%m:%s' 

these quite long , perhaps want better room them:

set xtics rotate -45 

see help time/date more.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -