Title: | A Lightweight Interface Between 'ggplot2' and 'igraph' Objects |
---|---|
Description: | Interface to integrate 'igraph' and 'ggplot2' graphics within spatial maps. 'RGraphSpace' implements new geometric objects using 'ggplot2' prototypes, customized for representing large 'igraph' objects in a normalized coordinate system. By scaling shapes and graph elements, 'RGraphSpace' can provide a framework for layered visualizations. |
Authors: | Victor Apolonio [ctb], Vinicius Chagas [ctb], Mauro Castro [aut, cre] |
Maintainer: | Mauro Castro <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.0.7 |
Built: | 2024-11-12 03:17:03 UTC |
Source: | https://github.com/sysbiolab/rgraphspace |
getGraphSpace
retrives information from
individual slots available in a GraphSpace object.
## S4 method for signature 'GraphSpace' getGraphSpace(gs, what = "summary")
## S4 method for signature 'GraphSpace' getGraphSpace(gs, what = "summary")
gs |
A preprocessed GraphSpace class object |
what |
A single character value specifying which information should be retrieved from the slots. Options: 'graph','gxy','gxyz','pars','misc','status','summits', 'summit_mask', and 'summit_contour'. |
Content from slots in the GraphSpace object.
# Load a demo igraph data('gtoy1', package = 'RGraphSpace') # Create a new GraphSpace object gs <- GraphSpace(gtoy1) # Get the 'summary' slot in gs getGraphSpace(gs, what = 'summary')
# Load a demo igraph data('gtoy1', package = 'RGraphSpace') # Create a new GraphSpace object gs <- GraphSpace(gtoy1) # Get the 'summary' slot in gs getGraphSpace(gs, what = 'summary')
GraphSpace
is a constructor of
GraphSpace-class objects.
GraphSpace(g, layout = NULL, mar = 0.075, verbose = TRUE)
GraphSpace(g, layout = NULL, mar = 0.075, verbose = TRUE)
g |
An |
layout |
an optional numeric matrix with two columns for |
mar |
A single numeric value (in |
verbose |
A single logical value specifying to display detailed
messages (when |
A GraphSpace class object.
Sysbiolab.
# Load a demo igraph data('gtoy1', package = 'RGraphSpace') gs <- GraphSpace(gtoy1)
# Load a demo igraph data('gtoy1', package = 'RGraphSpace') gs <- GraphSpace(gtoy1)
GraphSpace: An S4 class for PathwaySpace graphics
An S4 class object.
nodes
A data frame with xy-vertex coordinates.
edges
A data frame with edges.
graph
An igraph object.
pars
A list with parameters.
misc
A list with intermediate objects for downstream methods.
see GraphSpace
constructor.
Small 'igraph' objects used for workflow demonstrations. All graphs include 'x', 'y', and 'name' vertex attributes.
data(gtoy1)
data(gtoy1)
igraph
A pre-processed igraph object.
This package.
data(gtoy1) data(gtoy2)
data(gtoy1) data(gtoy2)
plotGraphSpace
is a wrapper function to
create dedicated ggplot graphics for igraph- and GraphSpace-class objects.
## S4 method for signature 'GraphSpace' plotGraphSpace( gs, xlab = "Graph coordinates 1", ylab = "Graph coordinates 2", font.size = 1, theme = c("th1", "th2", "th3"), bg.color = "grey95", marks = FALSE, mark.size = 3, mark.color = "grey20" ) ## S4 method for signature 'igraph' plotGraphSpace(gs, ..., layout = NULL, mar = 0.075)
## S4 method for signature 'GraphSpace' plotGraphSpace( gs, xlab = "Graph coordinates 1", ylab = "Graph coordinates 2", font.size = 1, theme = c("th1", "th2", "th3"), bg.color = "grey95", marks = FALSE, mark.size = 3, mark.color = "grey20" ) ## S4 method for signature 'igraph' plotGraphSpace(gs, ..., layout = NULL, mar = 0.075)
gs |
Either an |
xlab |
The title for the 'x' axis of a 2D-image space. |
ylab |
The title for the 'y' axis of a 2D-image space. |
font.size |
A single numeric value passed to ggplot themes. |
theme |
Name of a custom RGraphSpace theme. These themes (from 'th1' to 'th3') consist mainly of preconfigured ggplot settings, which the user can subsequently fine-tune within the resulting ggplot object. |
bg.color |
A single color for background. |
marks |
A logical value indicating whether to add 'marks' to vertex positions. Alternatively, this could be a vector listing vertex names. |
mark.size |
A font size argument passed to |
mark.color |
A color passed to |
... |
Additional arguments passed to the
|
layout |
an optional numeric matrix with two columns for |
mar |
A single numeric value (in |
A ggplot-class object.
Sysbiolab.
# Load a demo igraph data('gtoy1', package = 'RGraphSpace') # Generate a ggplot for gtoy1 plotGraphSpace(gtoy1) # Create a GraphSpace object gs <- GraphSpace(gtoy1) # Generate a ggplot for gs plotGraphSpace(gs)
# Load a demo igraph data('gtoy1', package = 'RGraphSpace') # Generate a ggplot for gtoy1 plotGraphSpace(gtoy1) # Create a GraphSpace object gs <- GraphSpace(gtoy1) # Generate a ggplot for gs plotGraphSpace(gs)