How to make publication-ready plots
Lennart Klein & Prof. Dr. Christian Fischer
University of Tübingen
Jul 26, 2023
Number of Variables (1, 2, 3, …)
Type of Variables (Discrete, Continuous, Time)
Kind of Visualization (e.g., Distribution, Relationship, Change, etc.)
dat %>%
ggplot(aes(x = is_teacher, fill = is_original)) +
geom_bar(width = 0.5) + # between 1.0 - 0.0
labs(x = NULL, y = "Frequency") +
scale_x_discrete(labels = c("Non-teacher", "Teacher")) +
scale_y_continuous(labels = scales::label_comma()) +
scale_fill_discrete("Original") + # Legend Title
theme(legend.position = "bottom") # Legend Positiontheme_apa()
ggplot2 default color paletteviridis color palettescale_ functions for color and fill
.png (Google Docs).pdf (Word, LaTeX)Use ggview() from the {ggview} package to quickly adjust plot sizes.