Network Visualization with ggplot2

This paper explores three different approaches to visualize networks by building on the grammar of graphics framework implemented in the ggplot2 package. The goal of each approach is to provide the user with the ability to apply the flexibility of ggplot2 to the visualization of network data, including through the mapping of network attributes to specific plot aesthetics. By incorporating networks in the ggplot2 framework, these approaches (1) allow users to enhance networks with additional information on edges and nodes, (2) give access to the strengths of ggplot2, such as layers and facets, and (3) convert network data objects to the more familiar data frames.

Sam Tyner , François Briatte , Heike Hofmann

CRAN packages used

igraph, sna, network, statnet, ggplot2, ggnetwork, geomnet, ggmap, ggfortify, GGally, gcookbook, intergraph, grid, ggrepel, ndtv, gridExtra, tnet, ggCompNet, tidyverse, plyr, dplyr

CRAN Task Views implied by cited packages

gR, SocialSciences, Graphics, Optimization, Spatial, Bayesian, Phylogenetics, WebTechnologies

Bioconductor packages used

ggbio, ggtree


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Tyner, et al., "The R Journal: Network Visualization with ggplot2", The R Journal, 2017

BibTeX citation

  author = {Tyner, Sam and Briatte, François and Hofmann, Heike},
  title = {The R Journal: Network Visualization with ggplot2},
  journal = {The R Journal},
  year = {2017},
  note = {},
  doi = {10.32614/RJ-2017-023},
  volume = {9},
  issue = {1},
  issn = {2073-4859},
  pages = {27-59}