Graphs

There are many ways of making the same kinds of graphs in R, each with its advantages and disadvantages. The focus here is on the ggplot2 package, which uses a "grammar of graphics" to design graphs, rather than the usual procedural methods.

Graphs with ggplot2

  1. Bar and line graphs (ggplot2)
  2. Plotting means and error bars (ggplot2)
  3. Plotting distributions (ggplot2) - Histograms, density curves, boxplots
  4. Scatterplots (ggplot2)
  5. Titles (ggplot2)
  6. Axes (ggplot2) - Control axis text, labels, and grid lines.
  7. Legends (ggplot2)
  8. Lines (ggplot2) - Add lines to a graph.
  9. Facets (ggplot2) - Slice up data and graph the subsets together in a grid.
  10. Multiple graphs on one page (ggplot2)
  11. Colors (ggplot2)

Miscellaneous

  1. Output to a file (PDF, PNG, TIFF)
  2. Shapes and line types - Set the shape of points and patterns used in lines.
  3. Antialiased bitmap output - If your plots look jagged or pixelated. (Not yet finished)

Basic graphs with standard graphics

  1. Histogram and density plot
  2. Scatterplot
  3. Box plot
  4. Q-Q plot

Other interesting graphs

  1. Correlation matrix