Discussion:
please help me with gnuplot xrange time data format
(too old to reply)
ygn
2005-02-17 21:58:05 UTC
Permalink
Hi,

I have a log file in the following format.

09:00:01 02/01/05 891044 167212 540236 827 883 10 4 86
09:00:02 02/01/05 890168 167212 540236 859 744 14 5 81
09:00:03 02/01/05 890512 167212 540236 1138 1108 18 5 77
09:00:04 02/01/05 891036 167212 540236 1154 1253 5 4 91

I want to plot column 1 against column 10. But column 1 is time format.
I do not want x data to represent date and I only want time. My time
format is as follow
set timefmt \"%H:%M:%S %m\/%d\/%y\"
set format x \"%H:%M\"

I want to plot the graph between 9:00 to 10:00 how can I give xdata
range?
I type in as follows and it give me invalid command.
set xrange ["11:00":"14:00"]

I would appreciate for any help.

Regards
awt
Juergen Wieferink
2005-02-18 09:11:35 UTC
Permalink
Post by ygn
09:00:01 02/01/05 891044 167212 540236 827 883 10 4 86
09:00:02 02/01/05 890168 167212 540236 859 744 14 5 81
09:00:03 02/01/05 890512 167212 540236 1138 1108 18 5 77
09:00:04 02/01/05 891036 167212 540236 1154 1253 5 4 91
I want to plot column 1 against column 10. But column 1 is time format.
I do not want x data to represent date and I only want time. My time
format is as follow
set timefmt \"%H:%M:%S %m\/%d\/%y\"
set format x \"%H:%M\"
I want to plot the graph between 9:00 to 10:00 how can I give xdata
range?
I type in as follows and it give me invalid command.
set xrange ["11:00":"14:00"]
I would appreciate for any help.
You are at least missing
gnuplot> set xdata time
Additionally, you should use the timefmt for the xrange, not the
format x (which is meant for output only).

But I don't get your example working either; I have never worked
with time data so far.

Juergen
Hans-Bernhard Broeker
2005-02-18 10:23:39 UTC
Permalink
Post by ygn
I want to plot column 1 against column 10. But column 1 is time format.
I do not want x data to represent date and I only want time.
Well, don't tell gnuplot to read the date, then!
Post by ygn
My time format is as follow
set timefmt \"%H:%M:%S %m\/%d\/%y\"
Change this to

set timefmt '%H:%M:%S'

and watch the difference.
Post by ygn
I type in as follows and it give me invalid command.
set xrange ["11:00":"14:00"]
This will have to bcome

set xrange ['11:00:00':"14:00:00"]

to match the input format (--> set timefmt), rather than the output
one (--> set format x)
--
Hans-Bernhard Broeker (***@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
ygn
2005-02-18 15:43:12 UTC
Permalink
Thanks a lot Broeker.

Regards
awt

Loading...