Skip to content

Instantly share code, notes, and snippets.

@cpsievert
Created June 25, 2020 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpsievert/e40b50902ae13e78c3160f2006780e3c to your computer and use it in GitHub Desktop.
Save cpsievert/e40b50902ae13e78c3160f2006780e3c to your computer and use it in GitHub Desktop.
---
title: "Thematic demo"
output:
html_document
---
```{r setup, include=FALSE}
library(bootstraplib)
bs_theme_base_colors(bg = "black", fg = "white")
bs_theme_accent_colors(primary = "salmon")
thematic::thematic_rmd()
```
## {.tabset .tabset-pills}
### ggplot2
```{r, message=FALSE, echo = FALSE}
library(ggplot2)
ggplot(diamonds[sample(nrow(diamonds), 1000), ], aes(carat, price)) +
geom_point(alpha = 0.2) +
geom_smooth() +
facet_wrap(~cut) + ggtitle("Diamond price by carat and cut")
```
### Lattice
```{r echo = FALSE}
lattice::show.settings()
```
### Base
```{r echo = FALSE}
pairs(
iris[,1:4], pch = 19,
col = iris$Species, lower.panel = NULL
)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment