diff --git a/session_4/session_4.Rmd b/session_4/session_4.Rmd index 27e2c9a031636df118a09b2b7ed3239275cdfa07..456e4ff91aabd2e3d7d0fa6d72119cc8b6c802e5 100644 --- a/session_4/session_4.Rmd +++ b/session_4/session_4.Rmd @@ -456,6 +456,13 @@ ggplot(data = mpg, mapping = aes(x = displ, y = hwy, color = class)) + </p> </details> +The choice of colors is very important for the comprehension of a graphic. Some palettes are not suitable for everyone. For example, for people with color blindness, color gradients from green to red, or from yellow to blue should be avoided. + +To display only Brewer palettes that are colorblind friendly, specify the option `colorblindFriendly = TRUE` as follows: + +```{r colorblindBrewer} +display.brewer.all(colorblindFriendly = TRUE) +```