Which tool to use?

When plotting data it pays to decide if you need:

  1. A quick way to visualise something specific – for example to check some feature of your data before you continue your analysis.

  2. A plot that is specifically designed to communicate your data effectively, and where you care about the details of the final output.

For the first case — for example to visualise a distribution of a single variable, or to check diagnostics from a linear model — there are lots of useful built-in functions in base-R and other packages.

For the second case — for example where you want to visualise the main outcomes of your study, or draw attention to specific aspects of your data — there is ggplot2.

We case 2 first, because using ggplot highlights many important aspects of plotting in general.