+ - 0:00:00
Notes for current slide
Notes for next slide

thematic: plot theming made easieR

Carson Sievert

Slides: https://bit.ly/thematic-show-tell

Website: https://rstudio.github.io/thematic/

1 / 18

thematic: simplified theming for ggplot2, lattice, and base R graphics

Not yet on CRAN, but install it now with:

remotes::install_github("rstudio/thematic")
library(thematic)

For auto-theming in shiny, you'll currently need:

remotes::install_github("rstudio/shiny")

For auto-theming in rmarkdown, you'll currently need:

remotes::install_github("rstudio/rmarkdown#1706")
2 / 18

Problem: R plots know nothing about CSS

3 / 18

shinythemes::shinytheme("darkly") ... 😞

4 / 18

Solution: thematic::thematic_on()

5 / 18

Solution: thematic::thematic_on() ...🎉

6 / 18

Works with any HTML/CSS

7 / 18

Write custom CSS in R with bslib!

8 / 18

Realtime-theming with bslib

9 / 18

Can even work w/ html_document() (independent of shiny)

10 / 18

What about non-HTML documents?

11 / 18

Provide colors & fonts to thematic_on()

12 / 18

Can also work with complete ggplot2 themes!

13 / 18

Problem: R plots know nothing about RStudio themes ...😞

14 / 18

Solution: thematic::thematic_on()

15 / 18

Solution: thematic::thematic_on() ...🎉

16 / 18

Summary

  • Call thematic_on() to make your R plots CSS/theme aware in shiny, rmarkdown, and RStudio! 🎉

  • If auto-theming doesn't work for you, provide colors & fonts to thematic_on()

    • Any Google Font works "out-of-the-box" (no install needed)
17 / 18

thematic: simplified theming for ggplot2, lattice, and base R graphics

Not yet on CRAN, but install it now with:

remotes::install_github("rstudio/thematic")
library(thematic)

For auto-theming in shiny, you'll currently need:

remotes::install_github("rstudio/shiny")

For auto-theming in rmarkdown, you'll currently need:

remotes::install_github("rstudio/rmarkdown#1706")
2 / 18
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow