use `stat()` instead of `..` in "3.7 Statistical transformations" (#751)
https://r4ds.had.co.nz/data-visualisation.html#statistical-transformations
This commit is contained in:
parent
6eb53ea069
commit
e25d3ac51b
|
@ -522,7 +522,7 @@ This works because every geom has a default stat; and every stat has a default g
|
|||
|
||||
```{r}
|
||||
ggplot(data = diamonds) +
|
||||
geom_bar(mapping = aes(x = cut, y = ..prop.., group = 1))
|
||||
geom_bar(mapping = aes(x = cut, y = stat(prop), group = 1))
|
||||
```
|
||||
|
||||
To find the variables computed by the stat, look for the help section
|
||||
|
|
Loading…
Reference in New Issue