ggplot2 is an actively maintained open-source chart-drawing package for R, written by Hadley Wickham, based upon the principles of "Grammar of Graphics". It partially replaces R's basic plot and the lattice package, while providing a clean, powerful, orthogonal and fun API.
ggplot2
is a plotting package for R, written by Hadley Wickham, based upon the principles of Grammar of Graphics by Leland Wilkinson. It partially replaces R's graphics
and the lattice
packages, while providing a clean, powerful and fun API.
Repositories
Vignettes
Frequently Asked Questions
Books
- ggplot2: Elegant Graphics for Data Analysis by Hadley Wickham (online)
- R Graphics Cookbook by Winston Chang
- R Graphics by Paul Murrell
Other resources
- Package homepage
- Current documentation
- Google group
- Graphs section of Cookbook for R by Winston Chang
- Detailed usage and comparison to lattice on the Learning R blog
- Posts on R-bloggers
- ggplot2-gallery with lot of example and use cases
- ggplot2 cheat sheet by RStudio
R packages extending ggplot2:
cowplot
. This provides support for arranging multipleggplot
plots using a robust grid system, as well as tools for annotating plots, and a theme optimized for academic publications.GGally
. Contains templates for different plots to be combined into a plot matrix, as well as a parallel coordinate plot function.ggalt
. Extra Coordinate Systems, Geoms, Statistical Transformations, Scales & Fonts for ‘ggplot2’.ggcolpairs
Combination of GGplot2 plots into a matrix based on data columnsggdendro
Tools for extracting dendrogram and tree diagram plot data for use with ggplotgranovaGG
Graphical Analysis of Variance Using ggplot2nvis
Combination of visualization functions for nuclear data using ggplot2 and ggcolpairsggmap
. Allows visualization of spatial data and models on top of Google Maps, OpenStreetMap, or Stamen Maps using ggplot2ggsignif
. Provides a single layergeom_signif
which can calculate the significance of a difference between groups and add the annotation to the plotggstance
. Provides horizontal versions of ggplot2's stats and geoms.ggtern
. An extension to ggplot2 for the creation of ternary diagramsggthemes
. Contains extra geoms, scales, and themes for use with ggplot2ggsubplot
. Makes it easy to embed customized subplots within larger graphicsgridExtra
. This is useful for arranging multipleggplot
objects together, asggplot2
is based upon the grid graphics system. An alternative tocowplot
.ggpmisc
. Makes it easy to add equations and parameters from model fits as text or labels, to label peaks and/or valleys, to use time series objects as data, to label or highlight observations in low density regions, to debug stats code.ggrepel
. Makes it easy to add repulsive text and labels (relocated to avoid overlap).ggspectra
. Makes it easy to plot and annotate light spectra.ggridges
. Partially overlapping line plots that create the impression of a mountain range, useful for visualizing changes in distributions over time or space.ggtext
. Improved text rendering support for ggplot2, enables complex formatted plot labels.
See also the ggplot2 extensions web site.