Skip to contents

A variant of [theme_insper()] with smaller text, sized for figures inserted into Word documents and other print reports. A typical document figure is about 15 cm (6 in) wide — at that size the default 12 pt base of [theme_insper()] renders noticeably larger than the surrounding body text, so this variant lowers the base to 10 pt.

Usage

theme_insper_doc(base_size = 10, ...)

Arguments

base_size

Numeric. Base font size in points. Default is 10, sized for figures placed in text documents. All other text sizes are calculated relative to this value.

...

Additional arguments passed to [theme_insper()], such as grid, border, or align.

Value

A ggplot2 theme object that can be added to ggplot objects using the + operator.

See also

[theme_insper()]

Other themes: theme_insper()

Examples

if (FALSE) { # has_insper_fonts()
library(ggplot2)

p <- ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point() +
  labs(title = "Fuel efficiency", x = "Weight (1000 lbs)", y = "MPG")

# Smaller text for a figure destined for a Word document
p + theme_insper_doc()

if (FALSE) { # \dontrun{
# Save at document width and insert into Word without rescaling
save_insper_plot(p + theme_insper_doc(), "figure.png", width = 15)
} # }
}