An Implementation of Grammar of Graphics for Graphs and Networks
Overview
The grammar of graphics as implemented in ggplot2 is a poor fit for graph and network visualizations due to its reliance on tabular data input. ggraph is an extension of the ggplot2 API tailored to graph visualizations and provides the same flexible approach to building up plots layer by layer.
- Fixed a bug in the collapse functionality of
get_edges()(#362) - General upkeep and compatibility with ggplot2 v4.0.0
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK12 OK2026-04-25
Show 1 earlier changeHide 1 earlier change
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 84 (9 internal)includes a package overview page
- Examples that run
- 100%37 run in a plain check
- Exported functions with examples
- 66%
- Documented parameters
- 92%
- Return-value docs
- 34%
- Help pages citing references
- 21%
- Edges HTML
- Layouts HTML
- Nodes HTML
- tidygraph and ggraph HTML
Downloads
Repository
- PRs merged (all time)
- 66%
- Median days to close, 50 most recently updated closed issues
- 1,094
- Median days to close, 50 most recently updated closed PRs
- 17
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
12 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/thomasp85/ggraph on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2025-08-25 · The repository has a site deploy workflow
pkgdown site last built 2025-08-25
Show all practicesHide 2 practices
Dependencies
Installing ggraph adds 46 packages (29 with compiled code, 45 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, igraph 4.8 MB.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 30 more dependents and 67 packages that suggest it on CRAN ↗
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 2.2.2Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 2.2.12024-03-07 · diff ↗
- 2.2.02024-02-27 · diff ↗ ·
added 23 exports
GeomEdgeSf, StatEdgeBundleForce, StatEdgeBundleForce0, StatEdgeBundleForce2, StatEdgeBundleMinimal, StatEdgeBundleMinimal0, StatEdgeBundleMinimal2, StatEdgeBundlePath, StatEdgeBundlePath0, StatEdgeBundlePath2, StatFilterSf, StatReverse, geom_edge_bundle_force, geom_edge_bundle_force0, geom_edge_bundle_force2, geom_edge_bundle_minimal, geom_edge_bundle_minimal0, geom_edge_bundle_minimal2, geom_edge_bundle_path, geom_edge_bundle_path0, geom_edge_bundle_path2, geom_edge_sf, geom_node_sf - RR 4.3.0 released · 2023-04-21
- 2.1.02022-10-09 · diff ↗ ·
added 24 exports
guide_edge_colorsteps, guide_edge_coloursteps, scale_edge_alpha_binned, scale_edge_color_binned, scale_edge_color_fermenter, scale_edge_color_steps, scale_edge_color_steps2, scale_edge_color_stepsn, scale_edge_colour_binned, scale_edge_colour_fermenter, scale_edge_colour_steps, scale_edge_colour_steps2, scale_edge_colour_stepsn, scale_edge_fill_binned, scale_edge_fill_fermenter, scale_edge_fill_steps, scale_edge_fill_steps2, scale_edge_fill_stepsn, scale_edge_linetype_binned, scale_edge_shape_binned, scale_edge_size_binned, scale_edge_size_binned_area, scale_edge_width_binned, scale_label_size_binned - 2.0.62022-08-08 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 2.0.52021-02-23 · diff ↗
- 2.0.42020-11-16 · diff ↗
- 2.0.32020-05-20 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 2.0.22020-03-17 · diff ↗
Show 9 earlier eventsHide 9 earlier events
- 2.0.1
- 2.0.02019-09-02 · diff ↗ ·
removed 13 exports
createLayout, den_to_igraph, eAngle, gCon, gEdges, geom_node_treemap, geom_treemap, getConnections, getEdges, nAngle, network_to_igraph, treeApply, tree_applyadded 32 exports
GeomEdgeParallelPath, GeomEdgeParallelSegment, GeomEdgePoint, GeomEdgeSpanPath, GeomEdgeSpanSegment, GeomEdgeTile, StatEdgeBend, StatEdgeBend0, StatEdgeBend2, StatEdgeParallel, StatEdgeParallel0, StatEdgeParallel2, StatNodeVoronoi, collect_connections, collect_edges, geom_edge_bend, geom_edge_bend0, geom_edge_bend2, geom_edge_parallel, geom_edge_parallel0, geom_edge_parallel2, geom_edge_point, geom_edge_span, geom_edge_span0, geom_edge_span2, geom_edge_tile, geom_node_range, geom_node_voronoi, layout_to_table, node_rank_fabric and 2 more - RR 3.6.0 released · 2019-04-26
- 1.0.22018-07-07 · diff ↗ ·
removed 6 exports
guide_gengrob.edge_direction, guide_geom.edge_direction, guide_merge.edge_direction, guide_train.edge_colourbar, guide_train.edge_direction, scale_type.geometry - RR 3.5.0 released · 2018-04-23
- 1.0.12018-01-29 · diff ↗
- RR 3.4.0 released · 2017-04-21
- 1.0.02017-02-24
- RR 3.3.0 released · 2016-05-03
Package metadata
- First published
- 2017-02-24
- Total releases
- 14 / 9 yrs
- License
- MIT + file LICENSE OSI · relicensed from GPL-3 in 2.0.0
- Minimum R
- ≥ 2.10
- Bundled data
- 10.0 KB / 3 files
- Download size
- 3.4 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("ggraph")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.