You can try the following approach in R to get a plot similar to that shown below.

# Set the working directory
setwd(".")
# Load required packages
require("ggplot2")
require("animation")
#----------------------------------------------
# Curve animation function
#----------------------------------------------
animatePlot <- function(timeList, valueList) {
lapply(seq(0, length(timeList), 1), function(time_index) {
plotCurve(timeList[1:time_index], valueList[1:time_index])
})
}
#----------------------------------------------
# Function to actually plot each snapshot
#----------------------------------------------
plotCurve <- function(timeList, valueList) {
df = data.frame(Time = timeList, Value = valueList)
plt = ggplot(data = df) +
geom_line(aes(x = Time, y = Value), color = "blue", size = 1) +
xlab("Time (min.)") +
ylab("Value ") +
coord_cartesian(xlim = c(0, 1000), ylim = c(-3,3)) +
theme_bw()
print(plt)
}
#==============================================
# Load the time series file
# df = read.csv("timeseries.dat", sep="")
# Create data frame for testing
times = seq(from = 0, to = 1000, by = 15)
set.seed(1000)
values = rnorm(length(times))
# Create animation
saveGIF(animatePlot(times, values), interval = 0.2, movie.name = "animation.gif")