Generic function to make animations from RMODFLOW arrays
Animations from rmf 4d arrays
rmf_animate(...) # S3 method for rmf_4d_array rmf_animate( array, i = NULL, j = NULL, k = NULL, l = 1:dim(array)[4], title = "totim_unit", dis = dis, ..., file = "rmf_animation.gif", type = tools::file_ext(file), plot_type = "fill", width = c(600, 600, 8)[type == c("gif", "html", "pdf")], height = width, clean = TRUE, interval = 0.5, overlay = NULL, background = NULL )
... | other parameters passed to plot.rmf_4d_array |
---|---|
array | rmf 4d array |
i | row number |
j | column number |
k | layer number |
l | vector of time step numbers; defaults to 1 to the size of the fourth dimension of array |
title | animation title; if equal to 'totim', the total time is shown for each frame, as taken from the rmf_4d_array attributes, if equal to 'totim_unit', the time unit obtained from dis$itmuni is pasted to the totim times |
dis | dis object |
file | animation filename |
type | animation filetype; options are 'gif' (default), 'html' and 'pdf'; defaults to file extension |
plot_type | type of plot for plot.rmf_4d_array |
width | animation width; defaults to 600 pixels or 8 inch in case of pdf |
height | animation height; default equal to width |
clean | logical; should files other than the animation (e.g. frames) be removed? |
interval | time interval between frames, in seconds; can be a vector |
overlay | additional ggplot2 layers to add to all frames |
background | background ggplot2 plot for all frames |