Bläddra i källkod

Link to ggplot2-themes vignette in various places

tags/v0.3.0
Garrick Aden-Buie 6 år sedan
förälder
incheckning
d1d3042906
7 ändrade filer med 32 tillägg och 20 borttagningar
  1. +14
    -10
      R/ggplot2.R
  2. +2
    -0
      index.md
  3. +2
    -0
      man/fragments/_quick-intro.Rmd
  4. +3
    -1
      man/scale_xaringan.Rd
  5. +1
    -1
      man/theme_xaringan.Rd
  6. +8
    -7
      man/theme_xaringan_base.Rd
  7. +2
    -1
      man/theme_xaringan_inverse.Rd

+ 14
- 10
R/ggplot2.R Visa fil

#' #'
#' Creates \pkg{ggplot2} themes to match the xaringanthemer theme used in the #' Creates \pkg{ggplot2} themes to match the xaringanthemer theme used in the
#' \pkg{xaringan} slides that seamlessly matches the "normal" slide colors and #' \pkg{xaringan} slides that seamlessly matches the "normal" slide colors and
#' styles.
#' styles. See `vignette("ggplot2-themes")` for more information and examples.
#' #'
#' @param text_color Color for text and foreground, inherits from `text_color` #' @param text_color Color for text and foreground, inherits from `text_color`
#' @param background_color Color for background, inherits from #' @param background_color Color for background, inherits from
#' **Lifecycle:** [Maturing](https://www.tidyverse.org/lifecycle/#maturing) #' **Lifecycle:** [Maturing](https://www.tidyverse.org/lifecycle/#maturing)
#' #'
#' A \pkg{ggplot2} xaringanthemer plot theme to seamlessly match the "inverse" #' A \pkg{ggplot2} xaringanthemer plot theme to seamlessly match the "inverse"
#' \pkg{xaringan} slide colors and styles as styled by [xaringanthemer].
#' \pkg{xaringan} slide colors and styles as styled by [xaringanthemer]. See
#' `vignette("ggplot2-themes")` for more information and examples.
#' #'
#' @param text_color Color for text and foreground, inherits from `text_color` #' @param text_color Color for text and foreground, inherits from `text_color`
#' @param background_color Color for background, inherits from #' @param background_color Color for background, inherits from
#' #'
#' **Lifecycle:** [Maturing](https://www.tidyverse.org/lifecycle/#maturing) #' **Lifecycle:** [Maturing](https://www.tidyverse.org/lifecycle/#maturing)
#' #'
#' Provides a base plot theme for \pkg{ggplot2} to match the \pkg{xaringan} slide theme
#' created by [xaringanthemer]. The theme is designed to create a general plot
#' style from two colors, a `background_color` and a `text_color` (or foreground
#' color). Also accepts an `accent_color` and an `accent_secondary_color` that are
#' [xaringanthemer] is not required for the base theme. Use
#' [theme_xaringan()] or [theme_xaringan_inverse()] in xaringan slides styled by
#' xaringanthemer for a plot theme that matches the slide style.
#' Provides a base plot theme for \pkg{ggplot2} to match the \pkg{xaringan}
#' slide theme created by [xaringanthemer]. The theme is designed to create a
#' general plot style from two colors, a `background_color` and a `text_color`
#' (or foreground color). Also accepts an `accent_color` and an
#' `accent_secondary_color` that are [xaringanthemer] is not required for the
#' base theme. Use [theme_xaringan()] or [theme_xaringan_inverse()] in xaringan
#' slides styled by xaringanthemer for a plot theme that matches the slide
#' style. See `vignette("ggplot2-themes")` for more information and examples.
#' #'
#' @param text_color Color for text and foreground #' @param text_color Color for text and foreground
#' @param background_color Color for background #' @param background_color Color for background
#' **Lifecycle:** [Maturing](https://www.tidyverse.org/lifecycle/#maturing) #' **Lifecycle:** [Maturing](https://www.tidyverse.org/lifecycle/#maturing)
#' #'
#' Color and fill single-color scales for discrete and continuous values, #' Color and fill single-color scales for discrete and continuous values,
#' created using the primary accent color of the xaringanthemer styles.
#' created using the primary accent color of the xaringanthemer styles. See
#' `vignette("ggplot2-themes")` for more information and examples of
#' \pkg{xaringanthemer}'s \pkg{ggplot2}-related functions.
#' #'
#' @param ... Arguments passed on to either the \pkg{colorspace} scale #' @param ... Arguments passed on to either the \pkg{colorspace} scale
#' functions — one of [colorspace::scale_color_discrete_sequential()], #' functions — one of [colorspace::scale_color_discrete_sequential()],

+ 2
- 0
index.md Visa fil

scales based on the primary color used in your slides. See scales based on the primary color used in your slides. See
`?scale_xaringan` for more details. `?scale_xaringan` for more details.


More details and examples can be found in `vignette("ggplot2-themes")`.

``` r ``` r
library(ggplot2) library(ggplot2)
ggplot(diamonds) + ggplot(diamonds) +

+ 2
- 0
man/fragments/_quick-intro.Rmd Visa fil

the primary color used in your slides. the primary color used in your slides.
See `?scale_xaringan` for more details. See `?scale_xaringan` for more details.


More details and examples can be found in `vignette("ggplot2-themes")`.

```{r xaringanthemer-ggplot-setup, include=FALSE, eval=IS_README} ```{r xaringanthemer-ggplot-setup, include=FALSE, eval=IS_README}
style_mono_accent( style_mono_accent(
base_color = "#1c5253", base_color = "#1c5253",

+ 3
- 1
man/scale_xaringan.Rd Visa fil

\strong{Lifecycle:} \href{https://www.tidyverse.org/lifecycle/#maturing}{Maturing} \strong{Lifecycle:} \href{https://www.tidyverse.org/lifecycle/#maturing}{Maturing}


Color and fill single-color scales for discrete and continuous values, Color and fill single-color scales for discrete and continuous values,
created using the primary accent color of the xaringanthemer styles.
created using the primary accent color of the xaringanthemer styles. See
\code{vignette("ggplot2-themes")} for more information and examples of
\pkg{xaringanthemer}'s \pkg{ggplot2}-related functions.
} }
\examples{ \examples{
# Requires ggplot2 # Requires ggplot2

+ 1
- 1
man/theme_xaringan.Rd Visa fil



Creates \pkg{ggplot2} themes to match the xaringanthemer theme used in the Creates \pkg{ggplot2} themes to match the xaringanthemer theme used in the
\pkg{xaringan} slides that seamlessly matches the "normal" slide colors and \pkg{xaringan} slides that seamlessly matches the "normal" slide colors and
styles.
styles. See \code{vignette("ggplot2-themes")} for more information and examples.
} }
\examples{ \examples{
# Requires ggplot2 # Requires ggplot2

+ 8
- 7
man/theme_xaringan_base.Rd Visa fil

\description{ \description{
\strong{Lifecycle:} \href{https://www.tidyverse.org/lifecycle/#maturing}{Maturing} \strong{Lifecycle:} \href{https://www.tidyverse.org/lifecycle/#maturing}{Maturing}


Provides a base plot theme for \pkg{ggplot2} to match the \pkg{xaringan} slide theme
created by \link{xaringanthemer}. The theme is designed to create a general plot
style from two colors, a \code{background_color} and a \code{text_color} (or foreground
color). Also accepts an \code{accent_color} and an \code{accent_secondary_color} that are
\link{xaringanthemer} is not required for the base theme. Use
\code{\link[=theme_xaringan]{theme_xaringan()}} or \code{\link[=theme_xaringan_inverse]{theme_xaringan_inverse()}} in xaringan slides styled by
xaringanthemer for a plot theme that matches the slide style.
Provides a base plot theme for \pkg{ggplot2} to match the \pkg{xaringan}
slide theme created by \link{xaringanthemer}. The theme is designed to create a
general plot style from two colors, a \code{background_color} and a \code{text_color}
(or foreground color). Also accepts an \code{accent_color} and an
\code{accent_secondary_color} that are \link{xaringanthemer} is not required for the
base theme. Use \code{\link[=theme_xaringan]{theme_xaringan()}} or \code{\link[=theme_xaringan_inverse]{theme_xaringan_inverse()}} in xaringan
slides styled by xaringanthemer for a plot theme that matches the slide
style. See \code{vignette("ggplot2-themes")} for more information and examples.
} }
\examples{ \examples{
# Requires ggplot2 # Requires ggplot2

+ 2
- 1
man/theme_xaringan_inverse.Rd Visa fil

\strong{Lifecycle:} \href{https://www.tidyverse.org/lifecycle/#maturing}{Maturing} \strong{Lifecycle:} \href{https://www.tidyverse.org/lifecycle/#maturing}{Maturing}


A \pkg{ggplot2} xaringanthemer plot theme to seamlessly match the "inverse" A \pkg{ggplot2} xaringanthemer plot theme to seamlessly match the "inverse"
\pkg{xaringan} slide colors and styles as styled by \link{xaringanthemer}.
\pkg{xaringan} slide colors and styles as styled by \link{xaringanthemer}. See
\code{vignette("ggplot2-themes")} for more information and examples.
} }
\examples{ \examples{
# Requires ggplot2 # Requires ggplot2

Laddar…
Avbryt
Spara