Просмотр исходного кода

Remove underscore from enter/exit parameters in anim_options()

And update documentation for both options
pull/18/head
Garrick Aden-Buie 7 лет назад
Родитель
Сommit
ea8d47db0b
3 измененных файлов: 34 добавлений и 19 удалений
  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 Просмотреть файл

#' @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,

+ 12
- 7
man/anim_options.Rd Просмотреть файл

\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

+ 9
- 3
man/static_plot.Rd Просмотреть файл

\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

Загрузка…
Отмена
Сохранить