theme_apa | R Documentation |
ggplot2
Themeggplot2 theme with a white panel background, no grid lines, large axis and legend titles, and increased text padding for better readability.
theme_apa(base_size = 12, base_family = "", box = FALSE)
base_size |
Numeric. Base font size; other font sizes and margins are adjusted relative to this. |
base_family |
Character. Base font family. |
box |
Logical. Indicates whether to draw a black panel border. |
Object of class theme
and gg
, see ggplot2::theme()
.
ggplot2::theme_bw()
, ggplot2::theme()
# Copied from ?ggtheme
mtcars2 <- within(mtcars, {
vs <- factor(vs, labels = c("V-shaped", "Straight"))
am <- factor(am, labels = c("Automatic", "Manual"))
cyl <- factor(cyl)
gear <- factor(gear)
})
library("ggplot2")
p1 <- ggplot(mtcars2) +
geom_point(aes(x = wt, y = mpg, colour = gear)) +
labs(
title = "Fuel economy declines as weight increases",
subtitle = "(1973-1974)",
x = "Weight (1000 lbs)",
y = "Fuel economy (mpg)",
colour = "Gears"
)
p1
p1 + theme_apa()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.