generated from dracula/template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.qmd
98 lines (72 loc) Β· 2.88 KB
/
README.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
format: gfm
---
<!-- README.md is rendered from README.qmd. Edit README.qmd and render to update README.md -->
```{R options, echo=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
message = FALSE,
warning = FALSE
)
```
# {`dRacula`} | Dracula Theme for R <a href="https://draculatheme.com/"><img src="man/figures/logo.svg" align="right" height="139" alt="Dracula logo in an R hex sticker"/></a>
[![R-CMD-check](https://github.com/dracula/dRacula/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dracula/dRacula/actions/workflows/R-CMD-check.yaml)
> All things Dracula themed for R
## Install
```{R load-package, echo=FALSE}
devtools::load_all()
```
All instructions can be found at [draculatheme.com/R](https://draculatheme.com/R).
```{R devtools-install, echo=TRUE, eval=FALSE, output=FALSE}
devtools::install_github("dracula/dRacula")
```
or
```{R remotes-install, echo=TRUE, eval=FALSE, output=FALSE}
remotes::install_github("dracula/dRacula")
```
## Examples
```{R rnorm-hex-example, output=TRUE, eval=TRUE}
#| fig-width: 3.5
#| fig-height: 3
#| dpi: 150
library(dplyr)
library(ggplot2)
library(dRacula)
set.seed(1)
ggplot(data.frame(x = rnorm(10000), y = rnorm(10000)), aes(x = x, y = y)) +
geom_hex() + coord_fixed() +
ggtitle("RNORM Hex") +
scale_fill_dracula(discrete = FALSE) + theme_dracula()
```
```{R mpg-lm-example, output=TRUE, eval=TRUE}
#| fig-width: 3.5
#| fig-height: 3
#| dpi: 150
library(dplyr)
library(ggplot2)
library(dRacula)
lm <- lm(mpg ~ wt, data = mtcars)
ggplot(mtcars %>% mutate(resid = abs(resid(lm)), fitted = fitted(lm))) +
geom_line(aes(wt, fitted)) +
geom_point(aes(wt, mpg, color = resid)) +
scale_color_dracula(discrete = FALSE) +
theme_dracula() +
ggtitle("mtcars: MPG by Weight") +
labs(x = "Weight", y = "MPG", color = "Residuals")
```
## Team
This theme is maintained by the following person(s) and a bunch of [awesome contributors](https://github.com/dracula/dRacula/graphs/contributors).
| [![Jordan Bradford](https://github.com/jrdnbradford.png?size=100)](https://github.com/jrdnbradford) |
| --------------------------------------------------------------------------------------------------- |
| [Jordan Bradford](https://github.com/jrdnbradford) |
## Community
- [X](https://x.com/draculatheme) - Best for getting updates about themes and new stuff.
- [GitHub](https://github.com/dracula/dracula-theme/discussions) - Best for asking questions and discussing issues.
- [Discord](https://draculatheme.com/discord-invite) - Best for hanging out with the community.
## Contributing
See [`CONTRIBUTING.md`](/.github/CONTRIBUTING.md).
## Acknowledgments
I'm indebted to the {[viridis](https://sjmgarnier.github.io/viridis)} and {[wesanderson](https://github.com/karthik/wesanderson)} `R` packages for inspiration and several plot examples.
## License
[MIT License](./LICENSE)