From 8e2778416bf93ae74a9e737e3206d4c77129fcbb Mon Sep 17 00:00:00 2001 From: hpolvech <helene.polveche@ens-lyon.fr> Date: Thu, 14 Oct 2021 10:02:56 +0200 Subject: [PATCH] solution 2c --- session_4/session_4.Rmd | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/session_4/session_4.Rmd b/session_4/session_4.Rmd index 173f3f3..fb366bc 100644 --- a/session_4/session_4.Rmd +++ b/session_4/session_4.Rmd @@ -531,7 +531,22 @@ ggplot(expr_DM1, aes(samples, Genes, fill= log1p(counts))) + </p> </details> +It s better, but still not perfect! +Now let s use the [viridis color gradient](https://gotellilab.github.io/GotelliLabMeetingHacks/NickGotelli/ViridisColorPalette.html) for this graph. - +<details><summary>Solution</summary> + <p> +```{r heatmapViridis} +ggplot(expr_DM1, aes(samples, Genes, fill= log1p(counts))) + + geom_tile() + + scale_fill_viridis_c() + + labs(y="Genes", x = "Samples") + + theme( + axis.text.y = element_text(size= 4), + axis.text.x = element_text(size = 4, angle = 90) + ) +``` + </p> +</details> -- GitLab