More tidyverse! Probably the favourite plotting system for R these days.
Kieran Healy advises the following set up for visualisation in the tidyverse style :
my_packages <- c("tidyverse", "broom", "coefplot", "cowplot", "gapminder", "GGally", "ggrepel", "ggridges",X "gridExtra", "interplot", "margins", "maps", "mapproj", "mapdata", "MASS", "quantreg", "scales", "survey", "srvyr", "viridis", "viridisLite", "devtools") install.packages(my_packages, repos = "http://cran.rstudio.com")
- The ggplot2 reference is thorough but utterly inscrutable without knowing the philosophy of the thing.
- Fancy new features are best discovered via the extension gallery.
- The cheat sheet has useful graphical references, which is the appropriate way to consider this thing.
- Max Woolf’s simple ggplot tutorial
- The ggplot book is available free if you build it yourself
- The ggplot chapter of R for data science.
- Want arbitrary lines and stuff to appear in the legends? E.g. a mean line or multiple model fits.
- ggvis is the latest iteration of the Hadley Wickham’s ggplot family, AFAICT, but currently on hiatus
- animating is sort of possible using ggplot2 but it is not fun.
Other plotting systems
R Graphical Manual visualization of all CRAN R package example plots, and is searchable by topic.
Do you get an error like this when plotting SVGs?
unable to load shared object '/usr/local/Cellar/r/3.5.0_1/lib/R/library/grDevices/libs//cairo.so': dlopen(/usr/local/Cellar/r/3.5.0_1/lib/R/library/grDevices/libs//cairo.so, 6): image not found
homebrew R doesn’t support the
brew cask install r
or you can install
and use the device option
dev = "svglite".