Day 17 of viz with me

Data viz Beginner ggplot theme ppt presentation DataViz Challenge

We learn to play around with text size in the plots today.

Soundarya Soundararajan true
2024-10-17

Welcome to Day 17 of the “Viz with Me” series!

Goals for today: Preparing plots for presentations.

I have often noticed a common mistake made by scientists and students when presenting their plots during department talks. Many simply project the plots they have prepared for their papers directly into their PowerPoint presentations. But here is the problem: plots designed for papers are typically meant for reading in text-heavy documents, not for screen projections. The fonts and overall design are often too small for the audience to read easily during a presentation.

In presentations, your audience should never have to squint to read your charts.

To avoid this, we can adjust the font sizes by increasing the base size within the plot’s theme. Let me show you how.

Here’s a typical plot that you might use in a journal article:

library(palmerpenguins)
library(tidyverse)

penguins %>%
  ggplot(aes(bill_length_mm, body_mass_g, color=species)) +
  geom_point() +
labs(title="Bill Length vs Body Mass",
     x="Bill Length (mm)",
     y="Body Mass (g)",
     color="Species")+
  theme_minimal()

This works well for a journal, but if you use the same settings in a presentation, the text and labels will likely appear too small. To make the plot suitable for a PowerPoint presentation, we need to increase all the fonts.

penguins %>%
  ggplot(aes(bill_length_mm, body_mass_g, color=species)) +
  geom_point() +
  labs(title="Bill Length vs Body Mass",
     x="Bill Length (mm)",
     y="Body Mass (g)",
     color="Species")+
  theme_minimal(base_size=20)

Now you can see the difference! This version is ready for screen projection and will look much clearer when embedded in a PowerPoint slide.

See you tomorrow for Day 18 of #vizwithme!

Photo by Monstera Production

Citation

For attribution, please cite this work as

Soundararajan (2024, Oct. 17). My R Space: Day 17 of viz with me. Retrieved from https://github.com/soundarya24/SoundBlog/posts/2024-10-17-day-17-of-viz-with-me/

BibTeX citation

@misc{soundararajan2024day,
  author = {Soundararajan, Soundarya},
  title = {My R Space: Day 17 of viz with me},
  url = {https://github.com/soundarya24/SoundBlog/posts/2024-10-17-day-17-of-viz-with-me/},
  year = {2024}
}