diff --git a/DESCRIPTION b/DESCRIPTION index e9c563e..0fe0869 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -20,7 +20,7 @@ License: MIT + file LICENSE Encoding: UTF-8 LazyData: TRUE VignetteBuilder: knitr -RoxygenNote: 7.0.2 +RoxygenNote: 7.1.0 Roxygen: list(markdown = TRUE) URL: https://gganimate.com, https://github.com/thomasp85/gganimate BugReports: https://github.com/thomasp85/gganimate/issues diff --git a/R/animate.R b/R/animate.R index 84969e9..56bd800 100644 --- a/R/animate.R +++ b/R/animate.R @@ -28,7 +28,8 @@ #' @param start_pause,end_pause Number of times to repeat the first and last #' frame in the animation (default is `0` for both) #' @param rewind Should the animation roll back in the end (default `FALSE`) -#' @param ... Arguments passed on to the device +#' @param ... Arguments passed on to the device. +#' For available device arguments, see [grDevices::png()] or [grDevices::svg()] #' #' @return The return value of the [renderer][renderers] function #' @@ -104,6 +105,9 @@ #' #' # Use a different renderer #' animate(anim, renderer = file_renderer('~/animation/'))[1:6] +#' +#' # Specify device dimensions and/or resolution +#' animate(anim, height = 2, width = 3, units = "in", res = 150) #' } #' animate <- function(plot, ...) { diff --git a/man/animate.Rd b/man/animate.Rd index 1366cfd..070645d 100644 --- a/man/animate.Rd +++ b/man/animate.Rd @@ -31,7 +31,8 @@ knit_print.gganim(x, options, ...) \arguments{ \item{plot, x}{A \code{gganim} object} -\item{...}{Arguments passed on to the device} +\item{...}{Arguments passed on to the device. +For available device arguments, see \code{\link[grDevices:png]{grDevices::png()}} or \code{\link[grDevices:svg]{grDevices::svg()}}} \item{nframes}{The number of frames to render (default \code{100})} @@ -148,6 +149,9 @@ animate(anim, nframes = 100, end_pause = 10, rewind = TRUE) # Use a different renderer animate(anim, renderer = file_renderer('~/animation/'))[1:6] + +# Specify device dimensions and/or resolution +animate(anim, height = 2, width = 3, units = "in", res = 150) } }