Switch from stat() to after_stat() in chap 3. (#895)
The docs in of aes_eval in [most recent](https://ggplot2.tidyverse.org/reference/aes_eval.html?q=after%20_%20stat#arguments) ggplot2 3.3.2 say that after_stat() and after_scale() has replaced stat().
This commit is contained in:
parent
23996a081d
commit
e2d5d7b31a
|
@ -522,7 +522,7 @@ This works because every geom has a default stat; and every stat has a default g
|
||||||
|
|
||||||
```{r}
|
```{r}
|
||||||
ggplot(data = diamonds) +
|
ggplot(data = diamonds) +
|
||||||
geom_bar(mapping = aes(x = cut, y = stat(prop), group = 1))
|
geom_bar(mapping = aes(x = cut, y = after_stat(prop), group = 1))
|
||||||
```
|
```
|
||||||
|
|
||||||
To find the variables computed by the stat, look for the help section
|
To find the variables computed by the stat, look for the help section
|
||||||
|
|
Loading…
Reference in New Issue