Skip to content
Join our email list to get $80 off Ally in November →
R for the Rest of Us Logo

R in 3 Months (Fall 2026)

Week 3 Live Session (Fall 2026)

Transcript

Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

In this week 3 session we covered data visualization with {ggplot2}, starting with how to think about charts in terms of aesthetic properties. We answered participant questions on color versus fill, reordering bars, flipping bar charts, wrapping long labels and removing legends, and previewed the data viz exercise and next week's Quarto lesson.

You'll learn:

  • How to format R code automatically on save with the Air extension, and how to turn on format on save in the settings
  • How to describe a chart in terms of {ggplot2} aesthetic properties such as x, y and fill
  • How to get a filled point with a different outline color by using shape = 21 in geom_point()
  • How to reorder bars with reorder() or by turning a variable into a factor, and why arrange() does not change plot order
  • How to adjust a flipped bar chart with hjust, change bar width, wrap long facet labels with str_wrap(), and remove a legend with legend.position = "none"

Resources mentioned:

Key moments:

  • 04:52 Most confusing parts of {ggplot2} and how it differs from Excel
  • 14:08 Demo of the Air extension for automatic code formatting
  • 17:13 Tall versus wide code formatting discussion
  • 20:49 Turning on format on save in user settings
  • 22:07 Reading a New York Times chart as aesthetic properties
  • 25:08 Single versus double equals signs and lowercase x and y
  • 29:27 Color versus fill in geom_point() and shape = 21
  • 35:25 Participant question on arrange() not changing plot order
  • 37:52 Reordering bars with reorder() and factors
  • 43:31 Flipping a bar chart and switching vjust to hjust
  • 47:36 Wrapping long facet labels with str_wrap()
  • 54:21 Removing a legend with legend.position

Your Turn

Re-create the plot

Option 1: copy the code from this page on your own R script file using Positron or RStudio

Option 2: play on this webpage interactively (the data and packages are already loaded)

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Shivani Singh

Shivani Singh • October 8, 2026

Is the link same as the one that was emailed on Tuesday. Veronica and I are on it

Course Content

143 Lessons

New from Ally Translate between base R and the tidyverse