plot.NetSim {spacejamr} | R Documentation |
Plot a simulated network from a NetSim object
Description
This can take either a PowerLawNetwork or APLNetwork object as input, both of which are chidren of the NetSim class.
Usage
## S3 method for class 'NetSim'
plot(
x,
y,
...,
layout = "stress",
title = "Network Simulation",
node_color = "red",
edge_color = "blue"
)
Arguments
x |
a NetSim graph |
y |
ignored. |
... |
ignored. |
layout |
a layout to display the graph. Layout must be a valid string. from the ggraph package. Default is "stress". |
title |
an optional title. |
node_color |
a color for the nodes. Default is blue. |
edge_color |
a color for the edges. Default is red. |
Details
This method returns a ggraph object, which can be further refined using standard ggraph and ggplot facilities.
Value
A plot of classes 'ggraph' 'gg' and 'ggplot'
Author(s)
Darren Colby
Email:dscolby17@gmail.com
Examples
# Load spacejamr object
data("RI")
ri_points <- PointSim(points = 10, window = RI, seed = 42)
spl_points <- NetSim(ri_points, base_prob = 0.92, scale = 1, threshold = 0.5,
power = -2.4)
plot(spl_points)
[Package spacejamr version 0.2.1 Index]