diff --git a/session_4/session_4.Rmd b/session_4/session_4.Rmd index 173f3f338f1edfdb866446aadfe12a4906acef02..fb366bcb6b67c9cb4f2d27c631c7ae242750ee88 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>