diff --git a/data-visualize.qmd b/data-visualize.qmd index d8f524b..9574f0b 100644 --- a/data-visualize.qmd +++ b/data-visualize.qmd @@ -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?