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

Equivalent coding between qplot and ggplot

In this section, we will have a look at how we can realize a few of the plots we introduced in Chapter 2, Getting Started, with the ggplot() function we have introduced in this chapter. The idea is that you can use this simple roadmap as guidance on how to use the ggplot() function to generate several kinds of plots, building on the knowledge of qplot() that you already have. We will not go into too much detail about the different plots since many basic concepts have already been introduced in the previous chapter and they apply to both functions.

In the following examples, we will use a few of the geom and stat functions listed in the summary tables previously presented; just remember that for each of ...

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