plot.NetSim | R Documentation |
This can take either a PowerLawNetwork or APLNetwork object as input, both of which are chidren of the NetSim class.
## S3 method for class 'NetSim' plot( x, y, ..., layout = "stress", title = "Network Simulation", node_color = "red", edge_color = "blue" )
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. |
This method returns a ggraph object, which can be further refined using standard ggraph and ggplot facilities.
A plot of classes 'ggraph' 'gg' and 'ggplot'
Darren Colby
Email:dscolby17@gmail.com
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.