s-news
[Top] [All Lists]

"dynamic" plot for a time series

To: <s-news@wubios.wustl.edu>
Subject: "dynamic" plot for a time series
From: "Theodore Kypraios" <kypreost@yahoo.gr>
Date: Wed, 3 Mar 2004 18:48:13 -0000
Organization: Lancaster University
Reply-to: "Theodore Kypraios" <t.kypraios@lancaster.ac.uk>
Dear all,

I have a  matrix X with n-columns and 1000 rows say. Each of the columns
represents a time series X_i(t), i=1,..,n.

I would like to have some how, a "dynamic" plot. For instance,

1. I want first to plot X_1(t) and then
2. the user should be asked to press a button (e.g. return) and then the
time series X_2(t) shoulb be drawn etc up to the n_th time series.
3. ...

In some sense, I want an on-line graphic output ... I tried the
following but it does not seem to work:

##
plot(1:1000, X[,1], type='l')

for ( i in 1:n) {

    par(ask=T)
    lines(X[,2],col=i)
}
###

Any ideas?
Thanks in advance for your time.

Theodore.




<Prev in Thread] Current Thread [Next in Thread>