animate_data | R Documentation |
Generates an animation of a data stream.
animate_data(dsd, horizon = 100, n = 1000, wait = 0.1, plot.args = NULL, ...)
dsd |
a DSD object |
horizon |
the number of points displayed at once/used for evaluation. |
n |
the number of points to be plotted |
wait |
the time interval between each frame |
plot.args |
a list with plotting parameters for the clusters. |
... |
extra arguments are added to |
Animations are recorded using the library animation and can be replayed (which gives a smoother experience since the is no more computation done) and saved in various formats (see Examples section below).
Note: You need to install package animation and its system requirements.
Michael Hahsler
animation::ani.replay()
for replaying and saving animations.
Other DSD:
DSD()
,
DSD_BarsAndGaussians()
,
DSD_Benchmark()
,
DSD_Cubes()
,
DSD_Gaussians()
,
DSD_MG()
,
DSD_Memory()
,
DSD_Mixture()
,
DSD_NULL()
,
DSD_ReadDB()
,
DSD_ReadStream()
,
DSD_Target()
,
DSD_UniformNoise()
,
DSD_mlbenchData()
,
DSD_mlbenchGenerator()
,
DSF()
,
close_stream()
,
get_points()
,
plot.DSD()
,
reset_stream()
Other plot:
animate_cluster()
,
plot.DSC()
,
plot.DSD()
if (interactive()) {
stream <- DSD_Benchmark(1)
animate_data(stream, horizon = 100, n = 5000, xlim = c(0,1), ylim = c(0,1))
### animations can be replayed with the animation package
library(animation)
animation::ani.options(interval = .1) ## change speed
ani.replay()
### animations can also be saved as HTML, animated gifs, etc.
saveHTML(ani.replay())
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.