animate.plot.series {ElectroGraph} | R Documentation |
Create a series of plots that animate the transitions between subsequent states of a relational data system.
animate.plot.series(plots.to.animate, intermediates=10, filebase="electro-animate", plot.width=600, plot.height=600, ...)
plots.to.animate |
A list of objects of class "electrograph.plot", the output from a plot(electrograph) command. |
intermediates |
The number of frames to intersperse between source plots. |
filebase |
The name of the directory into which the output files will be saved. |
plot.width, plot.height |
The height and width in pixels of the output PNG files. |
... |
Additional arguments to pass to ``plot''. |
Creates a series of plots in the PNG format in a directory named for ``filebase''. Also produces a shell script to produce an animated GIF of the sequence using the program ImageMagick. Function outputs the list of files produced in the animation.
Andrew C. Thomas <act@acthomas.ca>
#uses data "newcomb" in this set. data(electro.frats) newcomb.electro <- list(NA) for (kk in 1:dim(newcomb)[3]) { newcomb.electro[[kk]] <- electrograph(newcomb[,,kk]) } newcomb.plot <- list(NA) newcomb.plot[[1]] <- plot(newcomb.electro[[1]],connectivity.mode="ohmic", just=TRUE) for (kk in 2:length(newcomb.electro)) newcomb.plot[[kk]] <- plot(newcomb.electro[[kk]],connectivity.mode="ohmic", just=TRUE, previous.elec=newcomb.plot[[kk-1]]) animate.plot.series(newcomb.plot)