I'm trying to make a dynamic plot, sort of like auto updating, incremental, possibly real time.
I want to accomplish something like this
http://www.youtube.com/watch?v=s7qMxpDUS3c
This is what I have done so far. Suppose you have a time series in a data.frame called temp. First column is the time and the second column is where the values are.
for(i in 1: length(temp$Time[1:10000]))
{
flush.console()
plot(temp$Time[i:i+100],temp$Open[i:i+100],
xlim=c(as.numeric(temp$Time[i]),as.numeric(temp$Time[i+150])),
ylim=c(min(temp$Open[i:i+100]),max(tmep$Open[i:i+120])))
Sys.sleep(.09)
}
This does plot incrementally but I don't get the 100 units long time series instead i get just one point updating.
Best Answer
Do you want to do something like this?
Going through your code: