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 ...
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.