Adapt the function below to suit your needs. If you really want to plot 5 minutes at a time, round the time series to the last MM:00 times (where MM is in 5*0:11) and have idx below loop over them.
splitplot <- function(x,points) { boundaries <- c(1,points*1:floor(length(x)/points),length(x)) for (i in 2:length(boundaries)) { idx <- boundaries[i-1]:boundaries[i] plot(idx,x[idx],type="o") #here you may prefer time.of.x[idx] to idx } } #examples par(ask=TRUE) ; splitplot(rnorm(1000),350) par(mfrow=c(3,1),ask=FALSE) ; splitplot(rnorm(1000),350) > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gael de Lannoy > Sent: Monday, March 20, 2006 7:40 AM > To: r-help@stat.math.ethz.ch > Subject: [R] create a gui with a button to change graphic? > > Hello everybody, > > I am wondering if it is possible to create a gui to plot a > time series > that is very big, it's an EEG signal of 20mins. What I would > like to do > is plot the first 5mins, then have a button on the gui that plots the > next 5mins when pushed. > > Is it possible? > > Thanks in advance ! > > Gael. > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html