Skip to content

sysbiolab/RGraphSpace

Repository files navigation

RGraphSpace: A lightweight interface between 'igraph' and 'ggplot2' graphics

Highlights

  • Native ggplot2 interface for igraph objects
  • Optimized geoms for large-scale network visualization
  • Spatial alignment of networks with reference backgrounds
  • Interoperability with ggraph and tidygraph workflows

Overview

RGraphSpace is an R package that generates ggplot2 graphics for igraph objects (Csardi and Nepusz 2006), scaling nodes and edges to a unit space. The package implements new ggplot2 prototypes (Wickham 2016), optimized for representing large networks. This enables extensive customization of aesthetics and visual style, including interoperability with ggraph and tidygraph workflows (Pedersen 2024). Three specialized geoms translate graph data into geometric layers.

  1. geom_graphspace(): A high-level convenience layer that processes both nodes and edges in a single call.
  2. geom_nodespace(): Dedicated to rendering nodes. Inherits GeomPoint aesthetic mappings, modified to inform the edge layer on node states.
  3. geom_edgespace(): Handles the relational data between nodes. Inherits GeomSegment aesthetic mappings; unlike standard segments, it is "node-aware" and dynamically calibrates start and end points to connected nodes.

Installation in R (>=4.5)

Dependencies to build the vignettes
install.packages("knitr")
install.packages("rmarkdown")
install.packages("remotes")
Development version
remotes::install_github("sysbiolab/RGraphSpace", build_vignettes=TRUE)

Tutorials

Citation

If you use RGraphSpace, please cite:

  • Sysbiolab Team (2026). RGraphSpace: A lightweight interface between 'igraph' and 'ggplot2' graphics. R package version 1.2.0. Doi: 10.32614/CRAN.package.RGraphSpace

Licenses

The RGraphSpace package is distributed under Artistic-2.0

References

  • Csardi G, Nepusz T: The igraph software package for complex network research. InterJournal, Complex Systems 1695. 2006. https://igraph.org

About

A lightweight package for representing large igraph objects in a normalized coordinate system

Resources

Stars

Watchers

Forks

Contributors