Presentation tips

Lecture 25

Dr. Benjamin Soltoff

Cornell University
INFO 5001 - Fall 2024

December 3, 2024

Announcements

Announcements

  • Remaining project components

Presenting team projects

Goals

  • Introduce your objective(s) and dataset
  • Showcase the design/implementation of the deliverable(s)
  • Discuss the primary outcomes

Dos and don’ts

Do

  • Clearly state the objective(s) of your project
  • Identify design choices and implementation details
  • Use effective visuals to support outcomes of your deliverable
  • Practice your presentation

Don’t

  • Overwhelm the audience with too much information
  • Demo your app the entire time
  • Forget this is a different presentation medium

Themes

Is that gray background okay?

It adds contrast! Some people just don’t like it 🤷

Like this!

ggplot(penguins, aes(
  x = bill_depth_mm,
  y = bill_length_mm,
  color = species
)) +
  geom_point(size = 2) +
  theme_minimal()

And this!

library(ggthemes)

ggplot(penguins, aes(
  x = bill_depth_mm,
  y = bill_length_mm,
  color = species
)) +
  geom_point(size = 2) +
  theme_tufte()

Or this!

library(ggthemes)

ggplot(penguins, aes(
  x = bill_depth_mm,
  y = bill_length_mm,
  color = species
)) +
  geom_point(size = 2) +
  scale_color_economist() +
  theme_economist()

Adjusting text size

Adjusting text size

flipper_bill +
  theme_minimal(base_size = 11) +
  theme(
    legend.position.inside = c(0.85, 0.2),
    legend.background = element_rect(fill = "white", color = "black"),
    plot.title.position = "plot",
    plot.caption = element_text(hjust = 0, face = "italic"),
    plot.caption.position = "plot"
  )

Adjusting text size

Adjusting text size

flipper_bill +
  theme_minimal(base_size = 14) +
  theme(
    legend.position.inside = c(0.85, 0.2),
    legend.background = element_rect(fill = "white", color = "black"),
    plot.title.position = "plot",
    plot.caption = element_text(hjust = 0, face = "italic"),
    plot.caption.position = "plot"
  )

Adjusting text size

Plot layout

Sample plots

library(gapminder)

gapminder_07 <- filter(.data = gapminder, year == 2007)

p_hist <- ggplot(data = gapminder_07, mapping = aes(x = lifeExp)) +
  geom_histogram(binwidth = 2, color = "white")
p_box <- ggplot(data = gapminder_07, mapping = aes(x = continent, y = lifeExp)) +
  geom_boxplot()
p_scatter <- ggplot(data = gapminder_07, mapping = aes(x = gdpPercap, y = lifeExp)) +
  geom_point()
p_text <- gapminder_07 |>
  filter(continent == "Americas") |>
  ggplot(mapping = aes(x = gdpPercap, y = lifeExp)) +
  geom_text_repel(mapping = aes(label = country)) +
  coord_cartesian(clip = "off")

Slide with single plot, little text

The plot will fill the empty space in the slide.

p_hist

Slide with single plot, lots of text

  • If there is more text on the slide

  • The plot will shrink

  • To make room for the text

p_hist

Small fig-width

For a zoomed-in look

```{r}
#| fig-width: 3
#| fig-asp: 0.618

p_hist
```

Large fig-width

For a zoomed-out look

```{r}
#| fig-width: 10
#| fig-asp: 0.618

p_hist
```

fig-width affects text size

Multiple plots on a slide

First, ask yourself, must you include multiple plots on a slide? For example, is your narrative about comparing results from two plots?

  • If no, then don’t! Move the second plot to to the next slide!

  • If yes:

    • Insert columns using the Insert anything tool

    • Use layout-ncol chunk option

    • Use the patchwork package

    • Possibly, use pivoting to reshape your data and then use facets

Columns

Insert > Slide Columns

Quarto will automatically resize your plots to fit side-by-side.

layout-ncol

```{r}
#| fig-width: 5
#| fig-asp: 0.618
#| layout-ncol: 2
#| out-width: 100%

p_hist
p_scatter
```

patchwork

p_hist + p_scatter

patchwork

patchwork layout I

(p_hist + p_box) /
  (p_scatter + p_text)

patchwork layout I

patchwork layout II

p_text / (p_hist + p_box + p_scatter)

patchwork layout II

patchwork layout III

p_text + p_hist + p_box + p_scatter +
  plot_annotation(title = "Gapminder", tag_levels = c("A"))

patchwork layout III

patchwork layout IV

p_text +
  {
    p_hist + {
      p_box + p_scatter + plot_layout(ncol = 1) + plot_layout(tag_level = "new")
    }
  } +
  plot_layout(ncol = 1) +
  plot_annotation(tag_levels = c("1", "a"), tag_prefix = "Fig ")

patchwork layout IV

More patchwork

Learn more at https://patchwork.data-imaginist.com.

Wrap up

Wrap up

  • Adjust themes to match your design choices
  • Use the right plot(s) for your story
  • Ensure plots are clearly legible and interpretable to the audience

Acknowledgements