An open API service indexing awesome lists of open source software.

https://github.com/knapply/syknappticthemes

Personal ggplot2 themes
https://github.com/knapply/syknappticthemes

Last synced: 25 days ago
JSON representation

Personal ggplot2 themes

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(collapse = TRUE, comment = "##",
fig.retina = 4,
fig.path = "README_figs/README-",
fig.width = 10, fig.height = 7,
message = FALSE, warning = FALSE)

library(dplyr)
source("R/theme_nuclear.R")
```

## `syknappticThemes` : Custom themes for `ggplot2`

This package is intended to allow for easy reuse of themes I've made for various projects.

### `theme_nuclear()`

```{r}
ggplot(mpg, aes(displ, cty, color = factor(year))) +
geom_point() +
theme_nuclear() +
labs(title = "Much Deterrence.",
subtitle = "Very Scary. Wow.",
caption = "@syknapptic")
```

```{r}
mpg %>%
filter(manufacturer %in% c("audi", "chevrolet", "dodge", "ford")) %>%
ggplot(aes(displ, hwy, color = cyl)) +
geom_jitter(show.legend = TRUE) +
scale_color_continuous(low = "orange", high = "red") +
facet_wrap(~ manufacturer, scales = "free") +
theme_nuclear() +
theme(legend.position = "right") +
labs(title = "Many Delivery Systems.",
subtitle = "So Fusion. Wow.",
caption = "@syknapptic")
```