ggplot2 Chapters

You already know the ggplot2 basics - now it is time to take full control of your plots. This section covers axis customization, color palettes, theme design, export, advanced plot types, facetting, and useful extension packages.

Prerequisites: Before diving in, you should be comfortable with the content from First ggplot and Factors.

The chapters in this section use the R packages below. Run this once to install any that are missing:

pkgs <- c(
  "tidyverse", "gapminder", "scales", "glue", "ggtext",
  "showtext", "sysfonts", "ragg", "camcorder", "RColorBrewer",
  "MetBrewer", "viridis", "ggh4x", "ggrepel", "ggforce",
  "patchwork", "cowplot"
)
install.packages(setdiff(pkgs, rownames(installed.packages())))

How to navigate ..

.. through chapters

You can navigate chapters by clicking on the table of chapters on the left. Alternatively, you can always go to the next chapter by clicking on its name at the end (i.e. scroll all the way down)

.. through content within chapters

Within a chapter, you can navigate through the content by clicking on the table of contents on the right.