Skip to content

Commit

Permalink
New .Rd files in man-folder
Browse files Browse the repository at this point in the history
  • Loading branch information
einartornes committed Feb 21, 2023
1 parent 836be2b commit ee244b4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
7 changes: 5 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ Description: Provides Norads colour palette and theme for creating ggplot2 graph
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
Imports:
curl,
ggplot2,
grDevices
grDevices,
jsonlite,
sysfonts
6 changes: 2 additions & 4 deletions R/style_functions.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#' Function for using Norad's theme in ggplot2 graphics
#'
#'

#'@name theme_norad
sysfonts::font_add_google(name = "Arimo")
sysfonts::font_add_google(name = "EB Garamond")

Expand Down Expand Up @@ -64,8 +63,7 @@ theme_norad <- function() {
#' ggplot(mtcars, aes(factor(cyl), mpg)) +
#' geom_bar(aes(fill = factor(cyl)), stat = "identity") +
#' theme_norad()

#' @examples
#'
#' ggplot(mtcars, aes(factor(cyl), mpg)) +
#' geom_bar(aes(fill = factor(cyl)), stat = "identity") +
#' theme_norad()
10 changes: 8 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ knitr::opts_chunk$set(
)
```

# noradplot <img src="man/figures/sticker.png" align="right" width="120" />
# noradplot <img src="man/figures/sticker.png" align="right" width="120"/>

## Overview

Norads colour palette and plot style for creating ggplot2 graphics.

- Use `theme_norad()` to add norad style

- Use `scale_*` functions to add norad colour palette

## Examples

```{r example}
library(ggplot2)
Expand All @@ -29,5 +35,5 @@ ggplot(mpg, aes(displ, hwy, color = class)) +
```

## Credits
Based on Simon Jackson's blog post: Creating corporate colour palettes for ggplot2, BBC BBC Visual and Data Journalism cookbook for R graphics: https://bbc.github.io/rcookbook/ and Meghan Halls blog post Creating Custom colour palettes for ggplot2: https://meghan.rbind.io/blog/2022-10-11-creating-custom-color-palettes-with-ggplot2/

Based on Simon Jackson's blog post: Creating corporate colour palettes for ggplot2, BBC BBC Visual and Data Journalism cookbook for R graphics: <https://bbc.github.io/rcookbook/> and Meghan Halls blog post Creating Custom colour palettes for ggplot2: <https://meghan.rbind.io/blog/2022-10-11-creating-custom-color-palettes-with-ggplot2/>
3 changes: 0 additions & 3 deletions man/theme_norad.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ee244b4

Please sign in to comment.