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) ```