Plotting in R with ggplot2

ggplot2 is a powerful graphing package in R that can be used to create professional looking plot for reports, essays or papers. It can create a variety of plots including boxplots, scatterpots and histograms and they can be highly customised to suit your data.

The package is named after a book called The Grammar of Graphics about how to effectively communicate data graphically.

Start with the basics to learn the basic syntax of making a graph

Then, visit our other pages to further customise the aesthetics of the graph, including colour and formatting:
* altering the overall appearance
* adding titles and axis names
* colours and symbols.

Help on all the ggplot functions can be found at the The master ggplot help site.

A useful cheat sheet on commonly used functions can be downloaded here.

Chang, W (2012) R Graphics cookbook. O’Reilly Media. - a guide to ggplot with quite a bit of help online here

Year: 2016

Last updated: Feb 2022