[Kst] ctime display format

Matthew D Truch matt at truch.net
Sat Apr 22 18:07:17 CEST 2006


> Hi kst'ers,

Greetings (from at least one kst'er).

> After some minor wrestling, I managaed to import a large-ish (approx 400k
> lines) data set of fairly high-frequency observations from a text file. 

Cool.  Kst is great for large datasets, including datasets much larger
than 400k lines, and especially great for datasets that are growing
(being appended to) in real time.  

> Using ctime was the preferred option -- but I would like kst to use the fact
> that this is C time ... and let me display with strftime() variant :)

<snip>

> or I can simply convert them to C time, which is what I did to get the data
> into kst:
> 
> > as.numeric((index(Z)[1:4]))
> [1] 1141304401 1141304401 1141304401 1141304401
> > print(as.numeric((index(Z)[1:4])), digits=14)
> [1] 1141304400.786 1141304400.839 1141304400.971 1141304400.973
> 
> Now, is there a way to have kst convert these numerics back into 'human
> readable' time for display purposes?

Yes.  I'll assume that you have your data plotted with time on the x
axis (and you already have the plot).  Open the edit plot dialog (from
either the plots menu, or by pressing the shortcut 'e' when your mouse
is over the plot you want to edit).  Click on the x-axis tab, and in the
scale section, check the "Interpret as:" box.  Select standard C time as
the type, and choose your "Display as:" format from the (smallish) list of
available types.  

Hope that answers your question.  Good luck.  

-- 
"Hermits don't have peer pressure."
--------------------------
Matthew Truch
Department of Physics
Brown University
matt at truch.net
http://matt.truch.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kst/attachments/20060422/78c76ea2/attachment.pgp 


More information about the Kst mailing list