Pārlūkot izejas kodu

Remove underscore from enter/exit parameters in anim_options()

And update documentation for both options
pull/18/head
Garrick Aden-Buie pirms 7 gadiem
vecāks
revīzija
ea8d47db0b
3 mainītis faili ar 34 papildinājumiem un 19 dzēšanām
  1. +13
    -9
      R/plot_helpers.R
  2. +12
    -7
      man/anim_options.Rd
  3. +9
    -3
      man/static_plot.Rd

+ 13
- 9
R/plot_helpers.R Parādīt failu

@@ -7,12 +7,16 @@
#' @param title_family Font family for the plot title
#' @param text_size Font size of the plot text
#' @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.
#' @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
#' @export
anim_options <- function(
@@ -20,8 +24,8 @@ anim_options <- function(
state_length = 1,
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_size = NULL,
@@ -34,8 +38,8 @@ anim_options <- function(
state_length = state_length,
ease_default = ease_default,
ease_other = ease_other,
enter_ = enter_,
exit_ = exit_,
enter = enter,
exit = exit,
text_family = text_family,
text_size = text_size,
title_family = title_family,

+ 12
- 7
man/anim_options.Rd Parādīt failu

@@ -6,7 +6,7 @@
\usage{
anim_options(transition_length = 2, state_length = 1,
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_size = NULL, title_size = NULL, ...)
}
@@ -17,11 +17,19 @@ recycled to match the number of states in the data}
\item{state_length}{The relative length of the pause at the states. Will be
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.}

\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}

@@ -30,9 +38,6 @@ which the easeing should be applied, consistent with \code{\link[gganimate:ease_
\item{text_size}{Font size of the plot text}

\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{
Helper function to set animation and plotting options to be passed to

+ 9
- 3
man/static_plot.Rd Parādīt failu

@@ -17,10 +17,16 @@ static_plot(d, title = "", ..., anim_opts = anim_options(...))
\item{title_family}{Font family for the plot title}
\item{text_size}{Font size of the plot text}
\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.}
\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
recycled to match the number of states in the data}
\item{state_length}{The relative length of the pause at the states. Will be

Notiek ielāde…
Atcelt
Saglabāt