This repository has been archived by the owner on Nov 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
62 lines (47 loc) · 1.82 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# themes360info
Helpers for creating graphics with ggplot2 that align with 360info style guides
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
<!-- badges: end -->
# Installation
Install the package from GitHub with the `remotes` or `devtools` packages:
```r
remotes::install_github("360-info/themes360info")
```
## Use
To create plots in our style:
* Add `themes360info::theme_360` to your ggplot2 plot;
* Add our fonts to other elements, like annotations or additional theme customisations (see the ["Working with fonts" article](articles/articles/working-with-fonts.html));
* Get brand colours using `themes360info::colours_360`;
* Add text annotations to plots with `themes360info::annotate_360` and other helpers;
* Save the plot, adding a footer with the 360 logo, using `themes360info::save_360plot`
```{r demo}
library(ggplot2)
library(themes360info)
myplot <- ggplot(mtcars) +
aes(mpg, disp) +
geom_point() +
annotate_360_lightblue(x = 25, y = 350,
label = "**THIS IS A**<br>really interesting point") +
theme_360() +
labs(
title = "BIG STATEMENT",
subtitle = "But also some detail with a **key phrase** bolded",
caption = "**CHART:** James Goldie, 360info")
save_360plot(myplot, "man/figures/README-demo.png")
knitr::include_graphics("man/figures/README-demo.png")
```
## Help
Please feel free to [get in touch](https://github.com/360-info/themes360info/issues/new) if you have problems with the package or would like to suggest new features.