datetime - Can I plot times when they're given as UNIX timestamps with added milliseconds? -


i'm using gnuplot 4.4 on centos 6.6.

i've found many examples online showing following (note use of %.3s) enable timestamps "12:42:51.047" parsed , used x axis values:

set xdata time set format x "%h:%m:%.3s" set timefmt "%h:%m:%s" 

however, input not hh:mm:ss.mmm ssssssssss.mmm, integral part unix timestamp.

i tried following, parsing appeared have failed since datapoints rendered @ "00:00:00":

set xdata time set format x "%.3s" set timefmt "%h:%m:%s" 

the manual doesn't give indication possible but, again, doesn't %h:m:%.3s going work, either. possible want do? if so, how?

the precision must given output. parsing, seconds (or timestamp) treated floating numbers. reading in time stamp milliseconds seems supported since version 4.6.4 (tested here).

but, there workaround: specifying ($1) instead of 1 in using statement makes gnuplot treat value normal floating point number. note, not set timefmt, since circumvented workaround anyway.

then must know, before version 5, gnuplot's time reference 1. jan. 2000, must correct respective offset (unix time stamp of 1. jan 2000 946684800). so, following works gnuplot 4.4:

set xdata time set format x '%d.%m.%y %h:%m:%s' plot 'file.dat' using ($1 - 946684800):2 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -