Talk About Network

Google





Graphics > Gnuplot interactive function plotter > Re: compare tim...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 3350 of 3655
Post > Topic >>

Re: compare time date.

by worldeb@[EMAIL PROTECTED] Jun 9, 2008 at 05:37 PM

Hallo all.

Thanx Hans-Bernhard for your answer.

Hans-Bernhard Br=F6ker wrote:
> I suspect you'll need the development version for that.  You'll need at
> least the new functionalities of strptime() and string expressions. I'm
> not even sure it can be done with those:

I use gnuplot version 4.2 patchlevel 2.

> > plot 'dat.txt' u 2 : ( $2 >=3D "20080524 22:00:00" && $2 <=3D
"20080526
> > 02:00:00" ? $1/10 : 1/0 ) t '' ps 0.4 pt 1 lt 2
>
> Timefmt data and extended 'using' specifications don't work particularly
> well together.
>
> > as I understand gnuplot approximate date to nearest date.
>
> You understood that incorrectly.  gnuplot handles dates and times in
> seconds.

I can solve my problem in next way:

plot 'dat.txt' u 2 : ( (timecolumn(2)+946684800) >=3D `date +%s -u -d
"20080524 22:00:00"` && (timecolumn(2)+946684800) <=3D `date +%s -u -d
"20080526 02:00:00"` ? $1/10 : 1/0 ) t '' ps 0.4 pt 1 lt 2

Where:
$ date -u -d "2000-01-01 00:00:00" +%s
$ 946684800
$ date -u -d "1970-01-01 00:00:00" +%s
$ 0

So, I there is two solutions, one - development version of gnuplot (I
not check it) and another - which I find.
Anyone have other ideas?

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
localhost-V2008-12-19 Wed Jan 7 21:49:27 PST 2009.