theme_pub: Publication Theme

Description Usage Arguments Examples

View source: R/themes.R

Description

This is a publication ready theme created by Koundinya Desiraju in the following blog post: https://rpubs.com/Koundy/71792.

Defines the color palette for the 'fill' aesthetic used by the publication theme.

Defines the color palette for the 'color' aesthetic used by the publication theme.

Usage

1
2
3
4
5
6
theme_pub(base_size = 14, base_family = "helvetica",
  legend.position = "bottom")

scale_fill_pub(...)

scale_color_pub(...)

Arguments

base_size

The size of the fonts used throughout the theme.

base_family

The font family used throughout the theme.

legend.position

The position of the legends ("none", "left", "right", "bottom", "top").

...

Arguments passed to ggplot2::discrete_scale

...

Arguments passed to ggplot2::discrete_scale

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(ggplot2)

ggplot(mtcars, aes(x = factor(carb), fill = factor(carb))) +
  geom_bar() +
  scale_fill_pub() +
  theme_pub()


library(ggplot2)

ggplot(mtcars, aes(x = mpg, y = disp, color = factor(carb))) +
  geom_point() +
  scale_color_pub() +
  theme_pub()

joshloyal/loyalr documentation built on Aug. 31, 2021, 5:30 p.m.