#install ggplot2 install.packages("ggplot2")
This guide by STHDA is insanely helpful. It is a comprehensive guide that has codes for almost any plot and customisation you can think of and then some.
Useful ggplot2-related packages
patchwork– ever wanted to combine two or more plots together to save space? Ever wanted to have a histogram next to a scatterplot?
patchworkis the package for you! Install the
patchworkpackage by pasting this code:
#install patchwork install.packages("patchwork")
gganimate– an extension to ggplot2 that allows you to animate your ggplots and export them as GIFs or videos. Here’s a pretty comprehensive guide on how to do so. Install the
gganimatepackage by pasting this code:
#install gganimate install.packages("gganimate")