| plotStateGraph {BoolNet} | R Documentation |
Visualize state transitions and attractor basins
Description
Plots a graph containing all states visited in stateGraph, and optionally highlights attractors and basins of attraction. This requires the igraph package.
Usage
plotStateGraph(stateGraph, highlightAttractors = TRUE,
colorBasins = TRUE, colorSet,
drawLegend = TRUE, drawLabels = FALSE,
layout = layout.kamada.kawai,
piecewise = FALSE,
basin.lty = 2, attractor.lty = 1,
plotIt = TRUE,
colorsAlpha = c(colorBasinsNodeAlpha = .3,
colorBasinsEdgeAlpha = .3,
colorAttractorNodeAlpha = 1,
colorAttractorEdgeAlpha = 1),
...)
Arguments
stateGraph |
An object of class |
highlightAttractors |
If this parameter is true, edges in attractors are drawn bold and with a different line type (which can be specified in |
colorBasins |
If set to true, each basin of attraction is drawn in a different color. Colors can be specified in |
colorSet |
An optional vector specifying the colors to be used for the different attractor basins. If not supplied, a default color set is used. |
drawLegend |
If set to true and |
drawLabels |
If set to true, the binary encodings of the states are drawn beside the vertices of the graph. As this can be confusing for large graphs, the default value is FALSE. |
layout |
A layouting function that determines the placement of the nodes in the graph. Please refer to the |
piecewise |
If set to true, a piecewise layout is used, i.e. the subgraphs corresponding to different basins of attraction are separated and layouted separately. |
basin.lty |
The line type used for edges in a basin of attraction. Defaults to 2 (dashed). |
attractor.lty |
If |
plotIt |
If this is true, a plot is generated. Otherwise, only an object of class |
colorsAlpha |
These parameters apply alpha correction to the colors of basins and attractors in the following order: basin node, basin edge, attractor node, attractor edge. Defaults to a vector of length 4 with settings |
... |
Further graphical parameters to be passed to |
Details
This function uses the plot.igraph function from the igraph package. The plots are customizeable using the ... argument. For details on possible parameters, please refer to igraph.plotting.
Value
Returns an invisible object of class igraph containing the state graph, including color and line attributes.
See Also
getAttractors, simulateSymbolicModel, getTransitionTable, getBasinOfAttraction, getStateSummary, plotNetworkWiring, igraph.plotting
Examples
# load example data
data(cellcycle)
# get attractors
attractors <- getAttractors(cellcycle)
# plot state graph
## Not run:
plotStateGraph(attractors, main = "Cell cycle network", layout = layout.fruchterman.reingold)
## End(Not run)