https://github.com/knapply/syknappticthemes
Personal ggplot2 themes
https://github.com/knapply/syknappticthemes
Last synced: 25 days ago
JSON representation
Personal ggplot2 themes
- Host: GitHub
- URL: https://github.com/knapply/syknappticthemes
- Owner: knapply
- License: gpl-3.0
- Created: 2018-01-28T19:47:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-28T20:47:11.000Z (over 8 years ago)
- Last Synced: 2025-03-05T14:28:31.331Z (over 1 year ago)
- Language: R
- Size: 649 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
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")
```