# Graphs

There are many ways of making graphs in R, each with its advantages and disadvantages. The focus here is on the ggplot2 package, which is based on the Grammar of Graphics (by Leland Wilkinson) to describe data graphics.

### Graphs with ggplot2

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

### Miscellaneous

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