Clarify exercise

Fixes #794
This commit is contained in:
Hadley Wickham 2022-09-07 17:23:18 -05:00
parent 5aac0e9d75
commit 79981d598f
1 changed files with 13 additions and 3 deletions

View File

@ -724,10 +724,20 @@ ggplot(data = mpg, mapping = aes(x = displ, y = hwy)) +
geom_smooth(se = FALSE)
```
3. What does `show.legend = FALSE` do?
What happens if you remove it?\
3. Earlier in this chapter we used `show.legend` without explaining it:
Why do you think we used it earlier in the chapter?
```{r}
#| eval: false
ggplot(data = mpg) +
geom_smooth(
mapping = aes(x = displ, y = hwy, color = drv),
show.legend = FALSE
)
```
What does `show.legend = FALSE` do here?
What happens if you remove it?
Why do you think we used it earlier?
4. What does the `se` argument to `geom_smooth()` do?