ggpres: Adjust test size on a ggplot to make it visible in...

Description Usage Arguments Value Author(s) Examples

View source: R/ggpres.R

Description

Change the size of text on a ggplot so that a plot designed to look good in print is readable when included in a slide in a presentation (or vice verse)

Usage

1
ggpres(g, title_size = 24, text_size = 18)

Arguments

g

A ggplot graph

title_size

The font size for the title, legend title and axes titles

text_size

The font size for for the axis lables, legend text and facet text

Value

A ggplot graph

Author(s)

Ella Kaye

Examples

1
2
3
4
5
6
7
library(ggplot2)
g <- ggplot(mpg, aes(displ, hwy)) +
 geom_point() +
 facet_wrap(~class, scales = "free") +
 ggtitle("A faceted plot")
g2 <- ggpres(g)
g2 + geom_point(size = 2)

EllaKaye/EMK documentation built on July 26, 2020, 7:42 a.m.