Chapter 2. Getting Started

In this chapter, we will go through the main plot types that can be realized with ggplot2. In the examples, we will use the qplot() basic function so that you have a reference for how to realize such plots, even if you are not interested in a more detailed personalization of the graph details. We will see how to realize the following plots:

  • Histograms and density plots
  • Bar charts
  • Boxplots
  • Scatterplots
  • Time series plots
  • Bubble charts and dot plots

In Chapter 3, The Layers and Grammar of Graphics, we will describe the use of the ggplot function, and in the equivalent coding between qplot and ggplot, we will also discuss how to realize the plots with such a sophisticated function.

General aspects

The qplot (quick plot) function ...

Get ggplot2 Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.