more in line with set_text_* functionspkg
| @@ -3,7 +3,6 @@ | |||
| S3method(print,anim_opts) | |||
| export("%>%") | |||
| export(anim_options) | |||
| export(anim_options_set) | |||
| export(animate_anti_join) | |||
| export(animate_full_join) | |||
| export(animate_gather) | |||
| @@ -18,6 +17,7 @@ export(animate_union) | |||
| export(animate_union_all) | |||
| export(get_font_size) | |||
| export(is.anim_opts) | |||
| export(set_anim_options) | |||
| export(set_font_size) | |||
| importFrom(dplyr,anti_join) | |||
| importFrom(dplyr,arrange) | |||
| @@ -78,7 +78,7 @@ anim_options <- function( | |||
| #' @describeIn anim_options Set default animation options for the current session. | |||
| #' @param anim_opts An [anim_options()] options list. | |||
| #' @export | |||
| anim_options_set <- function(anim_opts = anim_options()) { | |||
| set_anim_options <- function(anim_opts = anim_options()) { | |||
| stopifnot(is.anim_opts(anim_opts)) | |||
| ao_old <- plot_settings$anim_opts | |||
| plot_settings$anim_opts <- merge(anim_opts, plot_settings$anim_opts) | |||
| @@ -211,13 +211,13 @@ get_font_size <- function() { | |||
| set_text_size <- function(size) { | |||
| old <- plot_settings$text_size | |||
| anim_options_set(anim_options(text_size = size)) | |||
| set_anim_options(anim_options(text_size = size)) | |||
| invisible(old) | |||
| } | |||
| set_title_size <- function(size) { | |||
| old <- plot_settings$title_size | |||
| anim_options_set(anim_options(title_size = size)) | |||
| set_anim_options(anim_options(title_size = size)) | |||
| invisible(old) | |||
| } | |||
| @@ -2,7 +2,7 @@ | |||
| % Please edit documentation in R/animate_options.R | |||
| \name{anim_options} | |||
| \alias{anim_options} | |||
| \alias{anim_options_set} | |||
| \alias{set_anim_options} | |||
| \title{Animation Options} | |||
| \usage{ | |||
| anim_options(transition_length = NULL, state_length = NULL, | |||
| @@ -12,7 +12,7 @@ anim_options(transition_length = NULL, state_length = NULL, | |||
| color_other = NULL, color_missing = NULL, color_fun = NULL, | |||
| text_color = NULL, ...) | |||
| anim_options_set(anim_opts = anim_options()) | |||
| set_anim_options(anim_opts = anim_options()) | |||
| } | |||
| \arguments{ | |||
| \item{transition_length}{The relative length of the transition. Will be | |||
| @@ -66,6 +66,6 @@ Helper function to set animation and plotting options to be passed to | |||
| } | |||
| \section{Functions}{ | |||
| \itemize{ | |||
| \item \code{anim_options_set}: Set default animation options for the current session. | |||
| \item \code{set_anim_options}: Set default animation options for the current session. | |||
| }} | |||