And update documentation for both optionspull/18/head
| #' @param title_family Font family for the plot title | #' @param title_family Font family for the plot title | ||||
| #' @param text_size Font size of the plot text | #' @param text_size Font size of the plot text | ||||
| #' @param title_size Font size of the plot title | #' @param title_size Font size of the plot title | ||||
| #' @param ease_default Default aes easing function. See [tweenr::display_ease] | |||||
| #' @param ease_default Default aes easing function. See [tweenr::display_ease()] | |||||
| #' for more options. | #' for more options. | ||||
| #' @param ease_other Additional aes easing options, named with aesthetic to | |||||
| #' which the easeing should be applied, consistent with [gganimate::ease_aes()]. | |||||
| #' @param enter_exit Enter/exit fading functions applied to objects in the animation. | |||||
| #' See [gganimate::enter_exit] for a complete list of options. | |||||
| #' @param ease_other Additional aes easing options, specified as a named list. | |||||
| #' List entries are named with the aesthetic to which the easeing should be | |||||
| #' applied, consistent with [gganimate::ease_aes()]. | |||||
| #' E.g. `list(color = "sine")`. | |||||
| #' @param enter Enter fading function applied to objects in the animation. See | |||||
| #' [gganimate::enter_exit] for a complete list of options. | |||||
| #' @param exit Exit fading function applied to objects in the animation. See | |||||
| #' [gganimate::enter_exit] for a complete list of options. | |||||
| #' @inheritParams gganimate::transition_states | #' @inheritParams gganimate::transition_states | ||||
| #' @export | #' @export | ||||
| anim_options <- function( | anim_options <- function( | ||||
| state_length = 1, | state_length = 1, | ||||
| ease_default = "sine-in-out", | ease_default = "sine-in-out", | ||||
| ease_other = NULL, | ease_other = NULL, | ||||
| enter_ = enter_fade(), | |||||
| exit_ = exit_fade(), | |||||
| enter = enter_fade(), | |||||
| exit = exit_fade(), | |||||
| text_family = "Fira Sans", | text_family = "Fira Sans", | ||||
| title_family = "Fira Mono", | title_family = "Fira Mono", | ||||
| text_size = NULL, | text_size = NULL, | ||||
| state_length = state_length, | state_length = state_length, | ||||
| ease_default = ease_default, | ease_default = ease_default, | ||||
| ease_other = ease_other, | ease_other = ease_other, | ||||
| enter_ = enter_, | |||||
| exit_ = exit_, | |||||
| enter = enter, | |||||
| exit = exit, | |||||
| text_family = text_family, | text_family = text_family, | ||||
| text_size = text_size, | text_size = text_size, | ||||
| title_family = title_family, | title_family = title_family, |
| \usage{ | \usage{ | ||||
| anim_options(transition_length = 2, state_length = 1, | anim_options(transition_length = 2, state_length = 1, | ||||
| ease_default = "sine-in-out", ease_other = NULL, | ease_default = "sine-in-out", ease_other = NULL, | ||||
| enter_ = enter_fade(), exit_ = exit_fade(), | |||||
| enter = enter_fade(), exit = exit_fade(), | |||||
| text_family = "Fira Sans", title_family = "Fira Mono", | text_family = "Fira Sans", title_family = "Fira Mono", | ||||
| text_size = NULL, title_size = NULL, ...) | text_size = NULL, title_size = NULL, ...) | ||||
| } | } | ||||
| \item{state_length}{The relative length of the pause at the states. Will be | \item{state_length}{The relative length of the pause at the states. Will be | ||||
| recycled to match the number of states in the data} | recycled to match the number of states in the data} | ||||
| \item{ease_default}{Default aes easing function. See \link[tweenr:display_ease]{tweenr::display_ease} | |||||
| \item{ease_default}{Default aes easing function. See \code{\link[tweenr:display_ease]{tweenr::display_ease()}} | |||||
| for more options.} | for more options.} | ||||
| \item{ease_other}{Additional aes easing options, named with aesthetic to | |||||
| which the easeing should be applied, consistent with \code{\link[gganimate:ease_aes]{gganimate::ease_aes()}}.} | |||||
| \item{ease_other}{Additional aes easing options, specified as a named list. | |||||
| List entries are named with the aesthetic to which the easeing should be | |||||
| applied, consistent with \code{\link[gganimate:ease_aes]{gganimate::ease_aes()}}. | |||||
| E.g. \code{list(color = "sine")}.} | |||||
| \item{enter}{Enter fading function applied to objects in the animation. See | |||||
| \link[gganimate:enter_exit]{gganimate::enter_exit} for a complete list of options.} | |||||
| \item{exit}{Exit fading function applied to objects in the animation. See | |||||
| \link[gganimate:enter_exit]{gganimate::enter_exit} for a complete list of options.} | |||||
| \item{text_family}{Font family for the plot text} | \item{text_family}{Font family for the plot text} | ||||
| \item{text_size}{Font size of the plot text} | \item{text_size}{Font size of the plot text} | ||||
| \item{title_size}{Font size of the plot title} | \item{title_size}{Font size of the plot title} | ||||
| \item{enter_exit}{Enter/exit fading functions applied to objects in the animation. | |||||
| See \link[gganimate:enter_exit]{gganimate::enter_exit} for a complete list of options.} | |||||
| } | } | ||||
| \description{ | \description{ | ||||
| Helper function to set animation and plotting options to be passed to | Helper function to set animation and plotting options to be passed to |
| \item{title_family}{Font family for the plot title} | \item{title_family}{Font family for the plot title} | ||||
| \item{text_size}{Font size of the plot text} | \item{text_size}{Font size of the plot text} | ||||
| \item{title_size}{Font size of the plot title} | \item{title_size}{Font size of the plot title} | ||||
| \item{ease_default}{Default aes easing function. See \link[tweenr:display_ease]{tweenr::display_ease} | |||||
| \item{ease_default}{Default aes easing function. See \code{\link[tweenr:display_ease]{tweenr::display_ease()}} | |||||
| for more options.} | for more options.} | ||||
| \item{ease_other}{Additional aes easing options, named with aesthetic to | |||||
| which the easeing should be applied, consistent with \code{\link[gganimate:ease_aes]{gganimate::ease_aes()}}.} | |||||
| \item{ease_other}{Additional aes easing options, specified as a named list. | |||||
| List entries are named with the aesthetic to which the easeing should be | |||||
| applied, consistent with \code{\link[gganimate:ease_aes]{gganimate::ease_aes()}}. | |||||
| E.g. \code{list(color = "sine")}.} | |||||
| \item{enter}{Enter fading function applied to objects in the animation. See | |||||
| \link[gganimate:enter_exit]{gganimate::enter_exit} for a complete list of options.} | |||||
| \item{exit}{Exit fading function applied to objects in the animation. See | |||||
| \link[gganimate:enter_exit]{gganimate::enter_exit} for a complete list of options.} | |||||
| \item{transition_length}{The relative length of the transition. Will be | \item{transition_length}{The relative length of the transition. Will be | ||||
| recycled to match the number of states in the data} | recycled to match the number of states in the data} | ||||
| \item{state_length}{The relative length of the pause at the states. Will be | \item{state_length}{The relative length of the pause at the states. Will be |