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

chore: Also set `na.value = "grey50"` in `scale_xaringan_discrete()`.

pull/82/head
Garrick Aden-Buie 11 месяцев назад
Родитель
Сommit
930699e62e
Не удалось извлечь подпись
2 измененных файлов: 7 добавлений и 5 удалений
  1. +3
    -2
      R/ggplot2.R
  2. +4
    -3
      man/scale_xaringan.Rd

+ 3
- 2
R/ggplot2.R Просмотреть файл

@@ -596,7 +596,8 @@ scale_xaringan_discrete <- function(
...,
color = NULL,
direction = 1,
inverse = FALSE
inverse = FALSE,
na.value = "grey50"
) {
requires_package("ggplot2", "scale_xaringan_discrete")

@@ -613,7 +614,7 @@ scale_xaringan_discrete <- function(
)
}

ggplot2::discrete_scale(aes_type, "manual", pal, ...)
ggplot2::discrete_scale(aes_type, "manual", pal, ..., na.value = na.value)
}

#' @rdname scale_xaringan

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

@@ -17,7 +17,8 @@ scale_xaringan_discrete(
...,
color = NULL,
direction = 1,
inverse = FALSE
inverse = FALSE,
na.value = "grey50"
)

scale_xaringan_fill_discrete(..., color = NULL, direction = 1, inverse = FALSE)
@@ -92,11 +93,11 @@ reverse the direction, e.g. \code{direction = -1}.}
color is chosen to work well with the inverse slide styles, namely the
value of \code{inverse_header_color}}

\item{na.value}{Color to be used for missing data points.}

\item{begin}{Number in the range of \code{[0, 1]} indicating to which point in the color scale the smallest data value should be mapped.}

\item{end}{Number in the range of \code{[0, 1]} indicating to which point in the color scale the largest data value should be mapped.}

\item{na.value}{Color to be used for missing data points.}
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#maturing}{\figure{lifecycle-maturing.svg}{options: alt='[Maturing]'}}}{\strong{[Maturing]}}

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