Hi folk,
I have problem with compare date in time format.
What I have: data in next format:
....
256 20080521 16:47:31
256 20080521 16:47:38
255 20080521 16:47:45
....
I want to create plot where data from "20080524 22:00:00" to "20080526
02:00:00" are showed in other color.
What I do:
set xdata time
set timefmt "%Y%m%d %H:%M:%S"
set format x "%Y-%m-%d %H:%M"
plot 'dat.txt' u 2 : ( $2 >= "20080524 22:00:00" && $2 <= "20080526
02:00:00" ? $1/10 : 1/0 ) t '' ps 0.4 pt 1 lt 2
it create green range not as I want but from "20080524 00:00:00" to
"20080527 00:00:00"
as I understand gnuplot approximate date to nearest date.
But if I use range - this work correctly:
set xrange ["20080524 22:00:00":"20080526 02:00:00"]
Who can comment this situation. And how I can solve it?
OK. I change date format to:
....
256 20080521_16:47:31
256 20080521_16:47:38
255 20080521_16:47:45
....
and try to plot as
set xdata time
set timefmt "%Y%m%d_%H:%M:%S"
set format x "%Y-%m-%d %H:%M"
plot 'dat.txt' u 2 : ( $2 >= "20080524_22:00:00" && $2 <=
"20080526_02:00:00" ? $1/10 : 1/0 ) t '' ps 0.4 pt 1 lt 2
But it is not help me. I have the same situation.
Thanx.