Skip to content

Commit 6f9aa8f

Browse files
committed
pkgdown incl
1 parent d747479 commit 6f9aa8f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+4432
-318
lines changed

Diff for: .Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
^\.Rproj\.user$
33
.travis.yml
44
README.*
5+
^docs$

Diff for: .gitignore

-11
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,26 @@
55
inst/doc
66
=======
77
# History files
8-
.Rhistory
98
.Rapp.history
109

1110
# Session Data files
12-
.RData
13-
1411
# Example code in package build process
1512
*-Ex.R
16-
1713
# Output files from R CMD build
1814
/*.tar.gz
19-
2015
# Output files from R CMD check
2116
/*.Rcheck/
22-
2317
# RStudio files
2418
.Rproj.user/
25-
2619
# produced vignettes
2720
vignettes/*.html
2821
vignettes/*.pdf
29-
3022
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
3123
.httr-oauth
32-
3324
# knitr and R markdown default cache directories
3425
/*_cache/
3526
/cache/
36-
3727
# Temporary files created by R markdown
3828
*.utf8.md
3929
*.knit.md
40-
4130
/*.html

Diff for: README.Rmd

+2-307
Original file line numberDiff line numberDiff line change
@@ -10,311 +10,6 @@ output:
1010
[![Build Status](https://travis-ci.org/Bart6114/artyfarty.svg?branch=master)](https://travis-ci.org/Bart6114/artyfarty)
1111
[![codecov](https://codecov.io/gh/Bart6114/artyfarty/branch/master/graph/badge.svg)](https://codecov.io/gh/Bart6114/artyfarty)
1212

13+
`artyfarty` is a collection ggplot themes published by dataroots.
1314

14-
> documentation generated using version `r packageVersion("artyfarty")`
15-
16-
```{r, include=FALSE}
17-
library(artyfarty)
18-
library(ggplot2)
19-
```
20-
21-
`artyfarty` focuses on providing easy access to a few 'nice' ggplot theme, it also includes a number of predefined palettes and watermark convenience functions.
22-
23-
`artyfarty` is a __work in progress__. For now you can install the development version using `devtools`.
24-
25-
```{r, eval=FALSE}
26-
devtools::install_github('bart6114/artyfarty')
27-
```
28-
29-
# Available themes
30-
31-
## dataroots
32-
33-
```{r}
34-
35-
ggplot(diamonds) +
36-
geom_bar(aes(cut, fill=cut)) +
37-
theme_dataroots() +
38-
ggtitle("Sparkly stones") +
39-
scale_fill_manual(values = pal("dataroots"))
40-
41-
ggplot(mtcars) +
42-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
43-
theme_dataroots() +
44-
ggtitle("Vroom") +
45-
scale_color_manual(values = pal("dataroots"))
46-
47-
48-
```
49-
50-
## farty
51-
52-
```{r}
53-
54-
ggplot(diamonds) +
55-
geom_bar(aes(cut, fill=cut)) +
56-
theme_farty() +
57-
ggtitle("Sparkly stones") +
58-
scale_fill_manual(values = pal("flat"))
59-
60-
ggplot(mtcars) +
61-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
62-
theme_farty() +
63-
ggtitle("Vroom") +
64-
scale_color_manual(values = pal("flat"))
65-
66-
67-
```
68-
69-
## scientific
70-
71-
```{r}
72-
73-
ggplot(diamonds) +
74-
geom_bar(aes(cut, fill=cut)) +
75-
theme_scientific() +
76-
ggtitle("Sparkly stones") +
77-
scale_fill_manual(values = pal("five38"))
78-
79-
ggplot(mtcars) +
80-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
81-
theme_scientific() +
82-
ggtitle("Vroom") +
83-
scale_color_manual(values = pal("five38"))
84-
85-
```
86-
87-
## monokai
88-
89-
```{r}
90-
91-
ggplot(diamonds) +
92-
geom_bar(aes(cut, fill=cut)) +
93-
theme_monokai() +
94-
ggtitle("Sparkly stones") +
95-
scale_fill_manual(values = pal("monokai"))
96-
97-
98-
ggplot(mtcars) +
99-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
100-
theme_monokai() +
101-
ggtitle("Vroom") +
102-
scale_color_manual(values = pal("monokai"))
103-
104-
```
105-
106-
## monokai_full
107-
108-
```{r}
109-
110-
ggplot(diamonds) +
111-
geom_bar(aes(cut, fill=cut)) +
112-
theme_monokai_full() +
113-
ggtitle("Sparkly stones") +
114-
scale_fill_manual(values = pal("monokai"))
115-
116-
117-
ggplot(mtcars) +
118-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
119-
theme_monokai_full() +
120-
ggtitle("Vroom") +
121-
scale_color_manual(values = pal("monokai"))
122-
123-
```
124-
125-
126-
## flat
127-
128-
```{r}
129-
130-
ggplot(diamonds) +
131-
geom_bar(aes(cut, fill=cut)) +
132-
theme_flat() +
133-
ggtitle("Sparkly stones") +
134-
scale_fill_manual(values = pal("flat"))
135-
136-
ggplot(mtcars) +
137-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
138-
theme_flat() +
139-
ggtitle("Vroom") +
140-
scale_color_manual(values = pal("flat"))
141-
142-
```
143-
144-
## five38
145-
146-
```{r}
147-
148-
ggplot(diamonds) +
149-
geom_bar(aes(cut, fill=cut)) +
150-
theme_five38() +
151-
ggtitle("Sparkly stones") +
152-
scale_fill_manual(values = pal("five38"))
153-
154-
ggplot(diamonds) +
155-
geom_bar(aes(cut, fill=cut)) +
156-
theme_five38(grid_lines = "horizontal") +
157-
ggtitle("Sparkly stones") +
158-
scale_fill_manual(values = pal("five38")) +
159-
coord_flip()
160-
161-
ggplot(mtcars) +
162-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
163-
theme_five38() +
164-
ggtitle("Vroom") +
165-
scale_color_manual(values = pal("five38"))
166-
167-
```
168-
169-
## retro
170-
171-
```{r}
172-
173-
ggplot(diamonds) +
174-
geom_bar(aes(cut, fill=cut)) +
175-
theme_retro() +
176-
ggtitle("Sparkly stones") +
177-
scale_fill_manual(values = pal("retro"))
178-
179-
ggplot(mtcars) +
180-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
181-
theme_retro() +
182-
ggtitle("Vroom") +
183-
scale_color_manual(values = pal("retro"))
184-
185-
```
186-
187-
## ft
188-
189-
```{r}
190-
191-
ggplot(diamonds) +
192-
geom_bar(aes(cut, fill=cut)) +
193-
theme_ft() +
194-
ggtitle("Sparkly stones") +
195-
scale_fill_manual(values = pal("ft"))
196-
197-
ggplot(diamonds) +
198-
geom_bar(aes(cut, fill=cut)) +
199-
theme_ft(grid_lines = "horizontal") +
200-
ggtitle("Sparkly stones") +
201-
scale_fill_manual(values = pal("ft")) +
202-
coord_flip()
203-
204-
ggplot(mtcars) +
205-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
206-
theme_ft() +
207-
ggtitle("Vroom") +
208-
scale_color_manual(values = pal("ft"))
209-
210-
```
211-
212-
## bain
213-
214-
```{r}
215-
216-
ggplot(diamonds) +
217-
geom_bar(aes(cut, fill=cut)) +
218-
theme_bain() +
219-
ggtitle("Sparkly stones") +
220-
scale_fill_manual(values = pal("bain"))
221-
222-
ggplot(diamonds) +
223-
geom_bar(aes(cut, fill=cut)) +
224-
theme_bain(grid_lines = "horizontal") +
225-
ggtitle("Sparkly stones") +
226-
scale_fill_manual(values = pal("bain")) +
227-
coord_flip()
228-
229-
ggplot(mtcars) +
230-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
231-
theme_bain() +
232-
ggtitle("Vroom") +
233-
scale_color_manual(values = pal("bain"))
234-
235-
```
236-
237-
## economist
238-
239-
```{r}
240-
241-
ggplot(diamonds) +
242-
geom_bar(aes(cut, fill=cut)) +
243-
theme_economist() +
244-
ggtitle("Sparkly stones") +
245-
scale_fill_manual(values = pal("economist"))
246-
247-
ggplot(diamonds) +
248-
geom_bar(aes(cut, fill=cut)) +
249-
theme_economist(grid_lines = "horizontal") +
250-
ggtitle("Sparkly stones") +
251-
scale_fill_manual(values = pal("economist")) +
252-
coord_flip()
253-
254-
ggplot(mtcars) +
255-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
256-
theme_economist() +
257-
ggtitle("Vroom") +
258-
scale_color_manual(values = pal("economist"))
259-
260-
```
261-
262-
## empty
263-
264-
```{r}
265-
266-
ggplot(diamonds) +
267-
geom_bar(aes(cut, fill=cut)) +
268-
theme_empty() +
269-
ggtitle("Sparkly stones") +
270-
scale_fill_manual(values = pal("flat"))
271-
272-
ggplot(mtcars) +
273-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
274-
theme_empty() +
275-
ggtitle("Vroom") +
276-
scale_color_manual(values = pal("flat"))
277-
278-
```
279-
280-
# Palettes
281-
282-
A number of palettes are available through the `pal()` function. A visual overview can be acquired as follows:
283-
284-
```{r, fig.height=8, fig.width=8}
285-
plot_palettes()
286-
```
287-
288-
Check out the examples above to see how these palettes can be applied, refer to the `?pal()` documentation for more details
289-
290-
# Watermarks
291-
292-
A watermark might not add much value to a plot, but there are times that you just need to be able to to add a simple watermark.
293-
294-
```{r}
295-
ggplot(diamonds) +
296-
geom_bar(aes(cut, fill=cut)) +
297-
theme_retro() +
298-
ggtitle("Sparkly stones") +
299-
scale_fill_manual(values = pal("retro")) +
300-
watermark_img("vignettes/Rlogo.png", location="tl", alpha=.5)
301-
```
302-
303-
```{r}
304-
ggplot(mtcars) +
305-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
306-
theme_ft() +
307-
ggtitle("Vroom") +
308-
scale_color_manual(values = pal("ft")) +
309-
watermark_txt("watermark", location="br")
310-
```
311-
312-
```{r}
313-
ggplot(mtcars) +
314-
watermark_txt("watermark", location="center", rot=45, fontsize=36, alpha=.2) +
315-
geom_point(aes(x=wt, y=qsec, color=as.factor(cyl))) +
316-
theme_ft() +
317-
ggtitle("Vroom") +
318-
scale_color_manual(values = pal("ft"))
319-
```
320-
15+
Please check the introductory vignette: [](articles/introduction.html)

0 commit comments

Comments
 (0)