Skip to main content

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 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

Other resources

R packages extending ggplot2:

  • cowplot. This provides support for arranging multiple ggplot 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 columns
  • ggdendro Tools for extracting dendrogram and tree diagram plot data for use with ggplot
  • granovaGG Graphical Analysis of Variance Using ggplot2
  • nvis Combination of visualization functions for nuclear data using ggplot2 and ggcolpairs
  • ggmap. Allows visualization of spatial data and models on top of Google Maps, OpenStreetMap, or Stamen Maps using ggplot2
  • ggsignif. Provides a single layer geom_signif which can calculate the significance of a difference between groups and add the annotation to the plot
  • ggstance. Provides horizontal versions of ggplot2's stats and geoms.
  • ggtern. An extension to ggplot2 for the creation of ternary diagrams
  • ggthemes. Contains extra geoms, scales, and themes for use with ggplot2
  • ggsubplot. Makes it easy to embed customized subplots within larger graphics
  • gridExtra. This is useful for arranging multiple ggplot objects together, as ggplot2 is based upon the grid graphics system. An alternative to cowplot.
  • 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.

Related tags

Code Language (used for syntax highlighting): lang-r