Ƶ

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:

  • geom_density(): for
  • geom_dotplot(): for
  • geom_violin(): for making
  • geom_jitter(): for dealing with .

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

  • geom_abline(), geom_hline(), geom_vline(): for adding
  • geom_errorbar(): for adding
  • geom_smooth(): for adding and other conditional means

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 . You can find examples of how to use the waffle() function to make these plots or on .

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 , or the .

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 has some helpful example maps, as does .