这是indexloc提供的服务,不要输入任何密码
Skip to content

updates anim docs (#1146) #1153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/tm_animate.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#' Specify an animation
#'
#' Specify an animation from a tmap plot. This is similar to creating facets with [tm_facets()]. In stead of showing the facets next to each other, they are shown as animation frames. The animation subsequently be exported to a gif or video file (e.g. mp4) with [tmap_animation()]. If the tmap plot with [tm_animate()] is printed, the animation will be previewed. The default [tm_animate()] will show the individual frames slowly (frame per seconds (fps) set to 2) whereas [tm_animate_fast()] will show them like a movie (with a fps set to 24).
#' Specify an animation from a tmap plot. This is similar to creating facets with [tm_facets()]. Instead of showing facets next to each other, they are shown as animation frames. The animation subsequently can be exported to a gif or video file (e.g. mp4) with [tmap_animation()]. If the tmap plot with [tm_animate()] is printed, the animation will be previewed. The default [tm_animate()] will show the individual frames slowly (frame per seconds (fps) set to 2) whereas [tm_animate_fast()] will show them like a movie (with a fps set to 24).
#'
#' @description `tm_animate`
#'
#' @param by group by variable used to create the animation frames. Note: it is called `pages` in the core function [tm_facets()].
#' @param nframes number of animation frames. So far, this only applied experimentally in transition map variables. See the extension package tmap.cartogram.
#' @param fps frames per second. Default: 30 for `tm_facets_animate` and 2 for `tm_facets_animate_slow`.
#' @param play how should the animation be played? One of `"loop"`, `"pingpong"`, and `"once"`
#' @param play how should the animation be played? One of `"loop"` (default), `"pingpong"`, and `"once"`, where `"loop"` means that the animation will loop indefinitely, `"pingpong"` means that it will play forward and then backward, and `"once"` means that it will play only once.
#' @param dpr device pixel ratio. The ratio between the physical pixel density of a device and its logical pixel density.
#' @param ... passed on to [tm_facets()]
#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/tmap_animation.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#' Create a gif animation or video from an animated tmap plot. First use [tm_animate()] or [tm_animate_fast()] to animate the plot, and then apply [tmap_animation()] to save it as a gif or video file (e.g. mp4).
#'
#' @param tm tmap or a list of tmap objects. If `tm` is a tmap object,
#' facets should be created, where `nrow` and `ncol` in [tm_facets()] have to
#' be set to 1 in order to create one map per frame.
#' animation frames should be created using either [tm_animate()] or
#' [tm_animate_fast()].
#' @param filename filename. If omitted (default), the animation will be shown
#' in the viewer or browser. If specified, it should be a gif file or a video
#' file (i.e. mp4). The package `gifski` is required to create a gif animation.
Expand Down
4 changes: 2 additions & 2 deletions man/tm_animate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/tmap_animation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.