Extensions of ggplot2

More graph types and add-ons

Although some of the most frequently used graph types (geoms) are described above, some other commonly used geoms include:

There are also many extra add-ons (layers) that you can add to your plots using the following functions:

Waffle plots with waffle

Waffle plots (sometimes referred to as “square pie charts”) are a way of visualizing category breakdowns, where a grid of boxes is filled in with different colors to match your categories. Waffle plots can be created in R with the waffle package. You can find examples of how to use the waffle() function to make these plots on the R Documentation site or on R Bloggers.

Mosaic plots with ggmosaic

Mosaic plots are a way of visually displaying data from two or more categorical variables. The area of cells are used to show the frequency of observations. Mosaic plots can be created in R with the ggmosaic package, or the vcd package.

Spatial data with ggmap

You can use R for a wealth of spatial analyses (not covered here), and can also use R to make quick maps. ggmap is a package designed to follow many of the same basic principles and syntax as ggplot2, that allows you to display spatial data. The ggmap CRAN site has some helpful example maps, as does the R Graph Gallery.