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

plot theme examples are interactive only

tags/v0.3.0
Garrick Aden-Buie 6 лет назад
Родитель
Сommit
d87c8580b6
4 измененных файлов: 12 добавлений и 6 удалений
  1. +6
    -3
      R/ggplot2.R
  2. +2
    -1
      man/theme_xaringan.Rd
  3. +2
    -1
      man/theme_xaringan_base.Rd
  4. +2
    -1
      man/theme_xaringan_inverse.Rd

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

@@ -25,7 +25,8 @@
#' @inheritDotParams theme_xaringan_base
#'
#' @examples
#' if (requireNamespace("ggplot2", quietly = TRUE)) {
#' has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE)
#' if (interactive() && has_ggplot2) {
#' # Set xaringanthemer theme but save to tempfile
#' style_duo_accent(outfile = tempfile())
#'
@@ -83,7 +84,8 @@ theme_xaringan <- function(
#' @inheritDotParams theme_xaringan_base
#'
#' @examples
#' if (requireNamespace("ggplot2", quietly = TRUE)) {
#' has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE)
#' if (interactive() && has_ggplot2) {
#' # Set xaringanthemer theme but save to tempfile
#' style_duo_accent(outfile = tempfile())
#'
@@ -164,7 +166,8 @@ theme_xaringan_inverse <- function(
#' @param ... Ignored
#'
#' @examples
#' if (requireNamespace("ggplot2", quietly = TRUE)) {
#' has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE)
#' if (interactive() && has_ggplot2) {
#' library(ggplot2)
#' ggplot(iris) +
#' aes(Petal.Length, Petal.Width) +

+ 2
- 1
man/theme_xaringan.Rd Просмотреть файл

@@ -63,7 +63,8 @@ Creates \pkg{ggplot2} themes to match the xaringanthemer theme used in the
styles.
}
\examples{
if (requireNamespace("ggplot2", quietly = TRUE)) {
has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE)
if (interactive() && has_ggplot2) {
# Set xaringanthemer theme but save to tempfile
style_duo_accent(outfile = tempfile())


+ 2
- 1
man/theme_xaringan_base.Rd Просмотреть файл

@@ -72,7 +72,8 @@ color). Also accepts an \code{accent_color} and an \code{accent_secondary_color}
xaringanthemer for a plot theme that matches the slide style.
}
\examples{
if (requireNamespace("ggplot2", quietly = TRUE)) {
has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE)
if (interactive() && has_ggplot2) {
library(ggplot2)
ggplot(iris) +
aes(Petal.Length, Petal.Width) +

+ 2
- 1
man/theme_xaringan_inverse.Rd Просмотреть файл

@@ -62,7 +62,8 @@ A \pkg{ggplot2} xaringanthemer plot theme to seamlessly match the "inverse"
\pkg{xaringan} slide colors and styles as styled by \link{xaringanthemer}.
}
\examples{
if (requireNamespace("ggplot2", quietly = TRUE)) {
has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE)
if (interactive() && has_ggplot2) {
# Set xaringanthemer theme but save to tempfile
style_duo_accent(outfile = tempfile())


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