- Welcome to Fundamentals of R
- Update Everything
- Start a New Project
-
Data Wrangling and Analysis
- The Tidyverse
- Pipes
- select()
- mutate()
- filter()
- summarize()
- group_by() and summarize()
- arrange()
- Create a New Data Frame
- Bring it All Together (Data Wrangling)
-
Data Visualization
- The Grammar of Graphics
- Scatterplots
- Histograms
- Bar Charts
- Setting color and fill Aesthetic Properties
- Setting color and fill Scales
- Setting x and y Scales
- Adding Text to Plots
- Plot Labels
- Themes
- Facets
- Save Plots
- Bring it All Together (Data Visualization)
-
Quarto
- Quarto Overview
- YAML
- Text
- Code Chunks
- Tips for Working with Quarto
- Bring It All Together (Quarto)
-
Wrapping Up
- An Important Workflow Tip
Fundamentals of R
The Grammar of Graphics
This lesson is called The Grammar of Graphics, part of the Fundamentals of R course. This lesson is called The Grammar of Graphics, part of the Fundamentals of R course.
If the video is not playing correctly, you can watch it in a new window
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.
Learn More
To learn more about the grammar of graphics, start with Chapter 1 of R for Data Science or Chapter 1 of ggplot2: Elegant Graphics for Data Analysis, both of which show the basics of ggplot. The RStudio primers on visualizing data provide another great place to get started.
Two great books on the fundamentals of data visualization that include ggplot2 code are Fundamentals of Data Visualization by Claus Wilke and Data Visualization: A Practical Introduction by Kieran Healy.
Another good reference book is the R Graphics Cookbook by Winston Chang, which has “more than 150 recipes to help you generate high-quality graphs quickly, without having to comb through all the details of R’s graphing systems.”
To see ggplot2 in action, check out the ggplot2 flipbook by Gina Reynolds, which shows each step in building various plots. Both the R Graph Gallery and From Data to Viz show examples of plots and provide code to make them.
You need to be signed-in to comment on this post. Login.