[Kst] How to do a simple graph in kst

Barth Netterfield netterfield at physics.utoronto.ca
Thu Nov 1 02:50:57 CET 2007


On October 31, 2007, Bill Gee wrote:
> So here is what I am fighting:

Hmmm... I'm afraid we might end up 0 for 3 here :-( 

> 1) How the heck do you get dates to become the X axis?  I've tried every
> date format I can think of, but all kst will do is either give me garbage
> or give me what looks like about 10 seconds around midnight Jan 1 1969.  If
> I use the internally generated INDEX for the X-axis, kst will make a nice
> plot of the data.  Looking at dates that run from 0 to 22,000 is pretty
> useless, though.

AFAIK, the kst ascii data source can not parse dates on the input.  It is 
happy to read, and interpret, ctime though, if you can modify your file.  

> 2) How do you get multiple Y ranges?  The water depth ranges between about
> 1 and 3 feet while the temperatures are in the 55-62 range.  I want both on
> the same plot with appropriate scaling.

Not supported yet in any clean way (*there is a relatively painful way that 
normally does not give very nice results however).  Good support for this is 
a priority for kst2.  I think the best you can do now is two vertically 
stacked plots.

> 3) I have other sets of data which do not exactly line up time-wise. 
> Rainfall events, for example ...  Every .01 inch generates an event with a
> time stamp. Is there a way to plot these events mixed in with the other
> data in time-sequence order?

Not sure what you mean here. You can plot multiple curves on the same plot 
with the same axis.


More information about the Kst mailing list