Title: | National Road Safety Observatory (ONSV) Style for 'ggplot2' Graphics |
---|---|
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. |
Authors: | Pedro Augusto Borges Santos [aut, cre] , ONSV - National Road Safety Observatory [cph, fnd] |
Maintainer: | Pedro Augusto Borges Santos <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.5.1 |
Built: | 2024-11-05 02:56:46 UTC |
Source: | https://github.com/pabsantos/onsvplot |
A list including the hex code of each color used in ONSV style
onsv_palette
onsv_palette
onsv_palette
A list with 12 colors: blue, yellow, red, green, pink, orange, lightblue, lightyellow, lightred, lightgreen, lightpink, lightorange, lightblue
scale_discrete_onsv()
is used to apply the ONSV color scale to a
ggplot graphics
scale_discrete_onsv(...)
scale_discrete_onsv(...)
... |
Arguments passed on to scale_discrete_manual or to discrete_scale, on a lower level. |
A custom scale object for ggplot objects
library(ggplot2) ggplot(data = iris, aes(x = Sepal.Width, y = Sepal.Length, color = Species)) + geom_point() + theme_onsv() + scale_discrete_onsv()
library(ggplot2) ggplot(data = iris, aes(x = Sepal.Width, y = Sepal.Length, color = Species)) + geom_point() + theme_onsv() + scale_discrete_onsv()
theme_onsv()
is used to apply the ONSV theme to a ggplot graphics.
theme_onsv(base_size = 11, ...)
theme_onsv(base_size = 11, ...)
base_size |
A number to define font base size, passed to theme_minimal |
... |
Arguments passed on to theme |
A custom theme()
object.
library(ggplot2) ggplot(data = iris, aes(x = Sepal.Width, y = Sepal.Length)) + geom_point() + theme_onsv()
library(ggplot2) ggplot(data = iris, aes(x = Sepal.Width, y = Sepal.Length)) + geom_point() + theme_onsv()