Introduction to ggplot2

This guide introduces users to the ggplot2 R package. ggplot2 is a popular R package that is used to make publication-quality graphs.

This guide consists of three data visualization examples (a histogram, a scatterplot, and a time-series line graph) and shows how to save plots. The examples use Ontario data from Statistics Canada’s Labour Force Survey (LFS) for 2025 and September 2026. They also use two sample datasets that come with ggplot2: diamonds and economics.

Additional learning materials are listed in the Resources section.

If you need assistance, fill out the support request form.

Technique: Converting data formats, Cleaning data
Tools: R
Data Format: Statistics