From bd32ddcfbb426b4257a74be58c32a6555b97de8a Mon Sep 17 00:00:00 2001 From: mine-cetinkaya-rundel Date: Thu, 2 Mar 2023 00:52:42 -0500 Subject: [PATCH] Remove redundancy, closes #1316 --- layers.qmd | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/layers.qmd b/layers.qmd index 8e15ac9..7b4502f 100644 --- a/layers.qmd +++ b/layers.qmd @@ -94,7 +94,7 @@ When `class` is mapped to `shape`, we get two warnings: Since ggplot2 will only use six shapes at a time, by default, additional groups will go unplotted when you use the shape aesthetic. The second warning is related -- there are 62 SUVs in the dataset and they're not plotted. -Similarly, we can map `class` to `size` or `alpha` (transparency) aesthetics as well. +Similarly, we can map `class` to `size` or `alpha` aesthetics as well, which control the shape and the transparency of the points, respectively. ```{r} #| layout-ncol: 2 @@ -125,8 +125,6 @@ Both of these produce warnings as well: Mapping a non-ordinal discrete (categorical) variable (`class`) to an ordered aesthetic (`size` or `alpha`) is generally not a good idea because it implies a ranking that does not in fact exist. -Similarly, we could have mapped `class` to the `alpha` aesthetic, which controls the transparency of the points, or to the `shape` aesthetic, which controls the shape of the points. - Once you map an aesthetic, ggplot2 takes care of the rest. It selects a reasonable scale to use with the aesthetic, and it constructs a legend that explains the mapping between levels and values. For x and y aesthetics, ggplot2 does not create a legend, but it creates an axis line with tick marks and a label.