From 2d0771ccd9fe24f099e00c0e0bea622275e0414f Mon Sep 17 00:00:00 2001
From: hadley <h.wickham@gmail.com>
Date: Fri, 12 Aug 2016 12:36:32 -0500
Subject: [PATCH] Mapping in consistent place

Fixes #246
---
 visualize.Rmd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/visualize.Rmd b/visualize.Rmd
index fc2f659..609c8d0 100644
--- a/visualize.Rmd
+++ b/visualize.Rmd
@@ -236,8 +236,8 @@ One way to add additional variables is with aesthetics. Another way, particularl
 To facet your plot by a single variable, use `facet_wrap()`. The first argument of `facet_wrap()` should be a formula, which you create with `~` followed by a variable name (here "formula" is the name of a data structure in R, not a synonym for "equation"). The variable that you pass to `facet_wrap()` should be discrete. 
 
 ```{r}
-ggplot(data = mpg, mapping = aes(x = displ, y = hwy)) + 
-  geom_point() + 
+ggplot(data = mpg) + 
+  geom_point(mapping = aes(x = displ, y = hwy)) + 
   facet_wrap(~ class, nrow = 2)
 ```