forked from datarootsio/artyfarty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
74 lines (52 loc) · 2.64 KB
/
README.Rmd
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# artyfarty
<div id="badges">
[](https://travis-ci.org/tadaadata/artyfarty)
[](https://codecov.io/github/tadaadata/artyfarty?branch=master)
<!--[](https://github.com/tadaadata/artyfarty/releases) -->
[](https://github.com/tadaadata/artyfarty/commits/master)
</div>
## Fork notice
The original package has not been in active development for >= 2 years, and since then some things have changed. This fork aims to bring the themes up to speed with regard to missing features, like setting fonts/colors for the `subtitle` ggplot2 elements missing in the original package.
### Goals
- Make all themes work with ggplot2 features currently missing (subtitle, caption). See [#1](https://github.com/tadaadata/artyfarty/issues/1)
- Convert manual palettes (`pal()`) to proper `scale_[color|fill]_palette` functions. The idea is to be consistent with theme packages like `hrbthemes` (<3)
## Installation
You can install the development version of artyfarty from with:
``` r
remotes::install_github("tadaadata/artyfarty")
```
## Examples
```{r theme_preview}
library(ggplot2)
library(artyfarty)
# List exported themes
exports <- getNamespaceExports("artyfarty")
themes <- exports[grepl(pattern = "^theme_", exports)]
p <- ggplot(data = mtcars, aes(x = hp, y = mpg, color = cyl)) +
geom_point() +
labs(subtitle = "Plot subtitle",
caption = "Caption",
x = "X axis text", y = "Y axis text")
for (theme in sort(themes)) {
p <- p + labs(title = theme) + eval(parse(text = theme))()
print(p)
}
```
## Code of Conduct
Please note that the [34m'artyfarty'[39m project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.
## Original README
`artyfarty` is a collection of ggplot themes published by [dataroots](http://dataroots.io).
For more info, please check out the examples and documentation [here](https://datarootsio.github.io/artyfarty).
An introductory vignette can be found [here](https://datarootsio.github.io/artyfarty/articles/introduction.html)