From 569349b3e448a2faf506e3f5bd9fd18f0646ef9d Mon Sep 17 00:00:00 2001 From: hpolvech <helene.polveche@ens-lyon.fr> Date: Thu, 14 Oct 2021 09:13:29 +0200 Subject: [PATCH] help1 --- session_4/session_4.Rmd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/session_4/session_4.Rmd b/session_4/session_4.Rmd index 5c71bda..27e2c9a 100644 --- a/session_4/session_4.Rmd +++ b/session_4/session_4.Rmd @@ -432,7 +432,13 @@ library(ghibli) library(viridis) ``` Using `mpg` and the 'ggplot2' package, reproduce the graph studied in session 2, 3.1: color mapping. -Modify the colors representing the class of cars with the palettes `Dark2` of [RColorBrewer](https://www.datanovia.com/en/fr/blog/palette-de-couleurs-rcolorbrewer-de-a-a-z/), then `MononokeMedium` from [Ghibli](https://github.com/ewenme/ghibli). +Modify the colors representing the class of cars with the palettes `Dark2` of [RColorBrewer](https://www.datanovia.com/en/fr/blog/palette-de-couleurs-rcolorbrewer-de-a-a-z/), then `MononokeMedium` from [Ghibli](https://github.com/ewenme/ghibli). + +```{r mpg_color} +ggplot(data = mpg, mapping = aes(x = displ, y = hwy, color = class)) + + geom_point() +``` +Go to the links to find the appropriate function: they are very similar between the two packages. <details><summary>Solution</summary> <p> -- GitLab