Update visualize.Rmd (#182)

changed "This defines how variables in your dataset and mapped to..." to "This defines how variables in your dataset are mapped to..."
This commit is contained in:
S'busiso Mkhondwane 2016-07-23 20:49:19 +02:00 committed by Hadley Wickham
parent 0c65570bb4
commit aea913df94
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ With ggplot2, you begin a plot with the function `ggplot()`. `ggplot()` creates
You complete your graph by adding one or more layers to `ggplot()`. The function `geom_point()` adds a layer of points to your plot, which creates a scatterplot. ggplot2 comes with many geom functions that each add a different type of layer to a plot. You'll learn a whole bunch of them through out this chapter.
Each geom function in ggplot2 takes a `mapping` argument. This defines how variables in your dataset and mapped to visual properties. You must always use `mapping()` in conjunction with `aes()`. The `x` and `y` arguments of `aes()` describe which variables to map to the x and y axes of your plot, and ggplot2 will look for those variables in your dataset, `mpg`.
Each geom function in ggplot2 takes a `mapping` argument. This defines how variables in your dataset are mapped to visual properties. You must always use `mapping()` in conjunction with `aes()`. The `x` and `y` arguments of `aes()` describe which variables to map to the x and y axes of your plot, and ggplot2 will look for those variables in your dataset, `mpg`.
Let's turn this code into a reusable template for making graphs with ggplot2. To make a graph, replace the bracketed sections in the code below with a dataset, a geom function, or a set of mappings.