Title: National Road Safety Observatory (ONSV) Style for 'ggplot2' Graphics
Version: 0.3.2
Description: Helps to create 'ggplot2' charts in the style used by the National Road Safety Observatory (ONSV). The package includes functions to customize 'ggplot2' objects with new theme and colors.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.2.3
Imports: ggplot2
Depends: R (≥ 2.10)
LazyData: true
Date: 2023-09-05
URL: https://github.com/pabsantos/onsvplot/
BugReports: https://github.com/pabsantos/onsvplot/issues/
NeedsCompilation: no
Packaged: 2023-09-05 12:57:46 UTC; pabsantos
Author: Pedro Augusto Borges Santos ORCID iD [aut, cre], ONSV - National Road Safety Observatory [cph, fnd]
Maintainer: Pedro Augusto Borges Santos <pabsantos21@gmail.com>
Repository: CRAN
Date/Publication: 2023-09-05 20:10:02 UTC

ONSV Color Palette

Description

A list including the hex code of each color used in ONSV style

Usage

onsv_palette

Format

onsv_palette

A list with 12 colors: blue, yellow, red, green, pink, orange, lightblue, lightyellow, lightred, lightgreen, lightpink, lightorange, lightblue

Source

https://www.onsv.org.br/


Apply ONSV color scale to ggplot object

Description

scale_discrete_onsv() is used to apply the ONSV color scale to a ggplot graphics

Usage

scale_discrete_onsv()

Value

A custom scale object for ggplot objects

Examples

library(ggplot2)

ggplot(data = iris, aes(x = Sepal.Width, y = Sepal.Length, color = Species)) +
  geom_point() +
  theme_onsv() +
  scale_discrete_onsv()

Apply ONSV theme to ggplot object

Description

theme_onsv() is used to apply the ONSV theme to a ggplot graphics.

Usage

theme_onsv(basesize = 10)

Arguments

basesize

A number to define font base size

Value

A custom theme() object.

Examples

library(ggplot2)

ggplot(data = iris, aes(x = Sepal.Width, y = Sepal.Length)) +
  geom_point() +
  theme_onsv()