Skip to content

Interactive Plot in R?

3 messages · corn at mail.tu-berlin.de, Erich Neuwirth

#
Hi,
I want to do an interactive plot in R:
I have a time series and I can plot it in the normal way:

plot(modifieddate,timeseries,type="l",xlab="Date",ylab="values", main="title")

(modifieddate is the values for the date on the x axis)

The aim now is, that I want to do a Latex Presentation, where if it  
comes to the slide where the plot is, the plot not just appears/shows  
up, but it is "drawn", that means, as if an human would draw it with a  
pencle. So I googled and I thougth it would be the best if I generate  
png for every point and match these to one gif an implement this. But  
the problem ist, I do not know, how to do these png in r? Could you  
help me?
1. Step I think is, to do a loop to draw every single point, but how  
can I do this?
This does not work:
for (i in 1: length(timeseries){
plot(modifieddate,timeseries[i],type="l",xlab="Date",ylab="values",  
main="title",add=1)
}

2. save every single drawing as a png, how can I do this?

Thanks a lot for your help!
#
You might want to give the packages animation a try.
On May 19, 2012, at 11:47 AM, corn at mail.tu-berlin.de wrote:

            
#
mh, I have read about the package before, but it does not help me a  
much.... I dont know how to do this?
Zitat von Erich Neuwirth <erich.neuwirth at univie.ac.at>: