Article view
RGraphSpace: Rendering graphs as coherent spatial objects in ggplot2
By Flávio Gabriel Carazza Kessler, Jonathan André Back, Lana Bazan Peters Querne, Victor Henrique Apolonio dos Santos, Mauro A. A. Castro
Article information
- Publisher
- Free Journal Network
- Publication
- Published 14 October 2026
- Institutions at publication
- Universidade Federal do Paraná
- Full text
- Read the article
Countries with citations
No data yet
Usage
Phase 3: not collected yet
Abstract
A graph describes a network structure of nodes connected by edges, and is used across many areas of science to represent relationships between entities. When the relationships themselves are spatial, node positions carry physical meaning, and the graph must be further represented within an external frame of reference. In R, igraph (Csardi & Nepusz, 2006) provides powerful tools for network analysis, and the ggplot2 ecosystem (Wickham, 2016) does the same for visualization, drawing nodes and edges as separate layers. Integrating the two remains challenging, however, because the geometry of these layers is not fully coordinated at rendering time, a consequence of ggplot2's input model in which each plot layer consumes a single rectangular table and is resolved independently. This design works remarkably well for most applications but is restrictive for graph structures with mutually dependent components. Because layers do not share transformed states, the graph is not rendered as a single coherent object. Here we introduce RGraphSpace, a streamlined interface that integrates igraph with ggplot2 graphics within a normalized coordinate space. It synchronizes node and edge layers, jointly resolving their geometry under standard aesthetic mappings. This coherence lets the graph be anchored to external reference frames, where it becomes a spatial object embedded in a wider context. Statement of needGraph handling in R rests on two mature foundations: igraph (Csardi & Nepusz, 2006) for network analysis and ggplot2 (Wickham, 2016) for layered visualization. The ggraph package (Pedersen, 2025a) bridges these, exposing relational data to the grammar of graphics. Graph data manipulation has similarly matured through tidygraph (Pedersen, 2025b), which represents graphs as tidy node and edge tables. Yet rendering a graph as a spatial object requires coordination across its components. Because ggplot2 resolves each layer independently, node and edge layers are not fully synchronized. Positional coordinates are shared, but other aesthetics are resolved per layer, so edges have no access to the rendered sizes of the nodes.RGraphSpace addresses this by mapping an igraph object into a normalized coordinate space in which nodes, edges, and their associated elements are resolved together. With node and edge geometries synchronized at rendering time, edges are drawn with respect to the final extent of the nodes they connect, and this correspondence is maintained even when node attributes are rescaled through the ggplot2 grammar. This normalized space serves a second purpose, placing the graph within a broader spatial Carazza-Kessler et al. (2026).RGraphSpace: Rendering graphs as coherent spatial objects in ggplot2.
Citations per year
| Year | Citations |
|---|---|
| 2026 | 0 |
OpenAlex counts citations by year for the last ten years only, so the total and the list of citing works can include earlier ones.
Works citing this article
OpenAlex counts no citations of this article yet.
Where its authors are based
Countries of the institutions the article's authors were affiliated to when it was published.
- AUTHORS
- CITATIONS No data yet
- USAGE Phase 3
| Country | Authors |
|---|---|
| Brazil | 5 |