Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Gnuplot interactive function plotter > compare time da...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 3350 of 3630
Post > Topic >>

compare time date.

by worldeb@[EMAIL PROTECTED] Jun 9, 2008 at 10:13 AM

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.
 




 3 Posts in Topic:
compare time date.
worldeb@[EMAIL PROTECTED]  2008-06-09 10:13:21 
Re: compare time date.
=?ISO-8859-1?Q?Hans-Bernh  2008-06-09 23:20:24 
Re: compare time date.
worldeb@[EMAIL PROTECTED]  2008-06-09 17:37:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 19:50:05 CST 2008.