😎 Give your xaringan slides some style
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

83 lines
3.2KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/ggplot2.R
  3. \name{theme_xaringan_inverse}
  4. \alias{theme_xaringan_inverse}
  5. \title{An Inverse Plot Theme for ggplot2 by xaringanthemer}
  6. \usage{
  7. theme_xaringan_inverse(
  8. text_color = NULL,
  9. background_color = NULL,
  10. accent_color = NULL,
  11. accent_secondary_color = NULL,
  12. css_file = NULL,
  13. ...
  14. )
  15. }
  16. \arguments{
  17. \item{text_color}{Color for text and foreground, inherits from \code{text_color}}
  18. \item{background_color}{Color for background, inherits from
  19. \code{background_color}}
  20. \item{accent_color}{Color for titles and accents, inherits from
  21. \code{header_color}}
  22. \item{accent_secondary_color}{Color for secondary accents, inherits from
  23. \code{text_bold_color}}
  24. \item{css_file}{Path to a \pkg{xaringanthemer} CSS file, from which the
  25. theme variables and values will be inferred. In general, if you use the
  26. \pkg{xaringathemer} defaults, you will not need to set this. This feature
  27. lets you create a \pkg{ggplot2} theme for your \pkg{xaringan} slides, even
  28. if you have only saved your theme CSS file and you aren't creating your
  29. CSS theme with \pkg{xaringanthemer} in your slides' source file.}
  30. \item{...}{
  31. Arguments passed on to \code{\link[=theme_xaringan_base]{theme_xaringan_base}}
  32. \describe{
  33. \item{\code{set_ggplot_defaults}}{Should defaults be set for \pkg{ggplot2} \emph{geoms}?
  34. Defaults to TRUE. To restore ggplot's defaults, or the previously set geom
  35. defaults, see \code{\link[=theme_xaringan_restore_defaults]{theme_xaringan_restore_defaults()}}.}
  36. \item{\code{text_font}}{Font to use for text elements, passed to
  37. \code{\link[sysfonts:font_add_google]{sysfonts::font_add_google()}}, if available and \code{text_font_use_google} is
  38. \code{TRUE}. Inherits from \code{text_font_family}.}
  39. \item{\code{text_font_use_google}}{Is \code{text_font} available on \href{https://fonts.google.com}{Google Fonts}?}
  40. \item{\code{text_font_size}}{Base text font size, inherits from \code{text_font_size}, or
  41. defaults to 11.}
  42. \item{\code{title_font}}{Font to use for title elements, passed to
  43. \code{\link[sysfonts:font_add_google]{sysfonts::font_add_google()}}, if available and \code{title_font_use_google} is
  44. \code{TRUE}. Inherits from \code{title_font_family}.}
  45. \item{\code{title_font_use_google}}{Is \code{title_font} available on \href{https://fonts.google.com}{Google Fonts}?}
  46. \item{\code{title_font_size}}{Base text font size, inherits from \code{title_font_size},
  47. or defaults to 14.}
  48. }}
  49. }
  50. \value{
  51. A ggplot2 theme
  52. }
  53. \description{
  54. \strong{Lifecycle:} \href{https://www.tidyverse.org/lifecycle/#experimental}{Experimental}.
  55. A \pkg{ggplot2} xaringanthemer plot theme to seamlessly match the "inverse"
  56. \pkg{xaringan} slide colors and styles as styled by \link{xaringanthemer}.
  57. }
  58. \examples{
  59. if (requireNamespace("ggplot2", quietly = TRUE)) {
  60. # Set xaringanthemer theme but save to tempfile
  61. style_duo_accent(outfile = tempfile())
  62. library(ggplot2)
  63. ggplot(iris) +
  64. aes(Petal.Length, Petal.Width) +
  65. geom_point() +
  66. theme_xaringan()
  67. }
  68. }
  69. \seealso{
  70. Other xaringanthemer ggplot2 themes:
  71. \code{\link{theme_xaringan_base}()},
  72. \code{\link{theme_xaringan_set_defaults}()},
  73. \code{\link{theme_xaringan}()}
  74. }
  75. \concept{xaringanthemer ggplot2 themes}