From: Thomas Sefzick <t.sefzick@fz...> - 2009-03-02 09:07:48
gnuplot> plot 'first.dat' u 1:2, 'second.dat' u (timecolumn(1)-86400):2
Jose Maria Martin Olalla wrote:
> Hi all.
> I have two file data both comparing time (in %S, the epoch format) and
> another variable. They both span over consecutive 24h. Say, first goes
> from 2009/02/27 00:00:00 to 23:59:59, and the second form 2009/02/28
> 00:00:00 to 23:59:59. I wish to plot both on the same x-axis as if they
> had been on the same day... in order to say differences at the same hour
> on consecutive days.
> I first assumed it would be possible to shift data by 86400 seconds (one
> gnuplot> set xdata time
> gnuplot> set timefmt "%s"
> gnuplot> set format x "%H:%M"
> gnuplot> plot 'first.dat' u 1:2, 'second.dat' u ($1-86400):2
> but it didn't work. Why? It seems it 86400 does not couple with the
> 1235717242 in the epoch.
> I would appriciate any hint for solving this problem. As general as
> possible since I am trying to script them so it is not possible to have a
> look to the precises values of the epoch contained in the files.
View this message in context: http://www.nabble.com/Shifting-time-with--s-tp22272375p22283485.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
Get latest updates about Open Source Projects, Conferences and News.