You might want to give the packages animation a try. On May 19, 2012, at 11:47 AM, c...@mail.tu-berlin.de wrote:
> 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! > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.