add_labels.Rd
This function adds character labels such as title or axis labels to animation frames created with frames_spatial
.
an object of class moveVis
created with frames_spatial
.
character, frame title. If NULL
, an existing title of frames
is removed. If waiver()
(default, see ggplot2::waiver()
), an existing title of frames
is kept.
character, frame subtitle. If NULL
, an existing title of frames
is removed. If waiver()
(default, see ggplot2::waiver()
), an existing title of frames
is kept.
character, frame caption. If NULL
, an existing title of frames
is removed. If waiver()
(default, see ggplot2::waiver()
), an existing title of frames
is kept.
character, frame tag. If NULL
, an existing title of frames
is removed. If waiver()
(default, see ggplot2::waiver()
), an existing title of frames
is kept.
character, label of the x axis. If NULL
, an existing title of frames
is removed. If waiver()
(default, see ggplot2::waiver()
), an existing title of frames
is kept.
character, label of the y axis. If NULL
, an existing title of frames
is removed. If waiver()
(default, see ggplot2::waiver()
), an existing title of frames
is kept.
logical, if TRUE
, messages and progress information are displayed on the console (default).
A frames object of class moveVis
.
library(moveVis)
library(move)
data("move_data", "basemap_data")
m <- align_move(move_data, res = 4, unit = "mins")
#> Temporal resolution of 4 [mins] is used to align trajectories.
# create spatial frames using a custom NDVI base layer
r_list <- basemap_data[[1]]
r_times <- basemap_data[[2]]
if (FALSE) {
frames <- frames_spatial(m, r_list = r_list, r_times = r_times, r_type = "gradient",
fade_raster = TRUE)
# add labels to frames:
frames <- add_labels(frames, title = "Example animation using moveVis::add_labels()",
subtitle = "Adding a subtitle to frames created using frames_spatial()",
caption = "Projection: Geographical, WGS84. Sources: moveVis examples.",
x = "Longitude", y = "Latitude")
# have a look at one frame
frames[[100]]
}