O'Reilly logo

ggplot2 Essentials by Donato Teutonico

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. The Layers and Grammar of Graphics

In this chapter, we will take a closer look at the grammar of graphics as implemented in ggplot2. We will go through the main concepts of the layer approach that will help you to understand and master the full potential of the basic qplot function which we were introduced to in Chapter 2, Getting Started. After a general introduction to the different components of the grammar of graphics, we will go deeper into the faceting, coordinate system, scales, and concept of layers in dedicated sections of this chapter. Afterwards, we will have a look at how you can use the ggplot() function and how its code relates to the one you have already seen used with the simplified qplot() function.

Components of layered ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required