- Your first ggplot2 figureThe grammar of graphics in the Code editor's R mode — data, aesthetics, geometries — built into a scatter plot with a fitted trend.
- Groups, facets, and themesCompare conditions in one figure — colour-mapped groups, small-multiple facets, and a theme that reads well in print.
- Distributions and histogramsHistograms, density curves, and honest binning — showing the shape of your data before you summarise it away.
- Summaries and error barsAggregate raw observations to mean ± error in base R, then plot bars, error bars, and the raw points over them.
- Fitting and plotting modelsFit with lm(), read the coefficients you'll quote, and draw the model over the data with a confidence ribbon you computed yourself.
R + ggplot2
Statistical graphics in R with ggplot2, from data frame to figure.