set_theme: set petgg theme

Description Usage Arguments Details Note Examples

View source: R/set_theme.R

Description

set petgg as default [ggplot2] theme

Usage

1

Arguments

base_size

is a numeric, font size in pts. Default is 12

base_family

is a character, font family. Default is "Helvetica"

base_line_size

is a numeric, base size for line elements. Default is 0.5

base_rect_size

is a numeric, base size for rect elements. Default is 0.5

axis_title

is a logical, TRUE shows the axis title, FALSE hides. Default is FALSE

legend_title

is a logical, TRUE show the legend title. Default is FALSE

legend_position

is a character, control legend position. Default is "bottom"

legend_direction

is a character, "verical" or "horizontal". Default is "horizontal"

palette,

is a character vector, define the color palette. Hexadecimal format.

load_font,

is a logical, load font using extrafont package. Default is "TRUE"

Details

Always load the package after ggplot2 or tidyverse

Note

More info https://ggplot2.tidyverse.org/reference/theme.html

Examples

1
2
3
4
petgg::set_theme() # Default options
petgg::set_theme(base_size = 14, base_family = "Times New Roman")
petgg::set_theme(base_size = 13, axis_title = T)
petgg::set_theme(legend_title = T, legend_position = "top")

peteconomia/petgg documentation built on Aug. 8, 2021, 6:45 a.m.