Description Usage Arguments Details Value Examples
Modify the edge size of a 'sigmaNet' object by providing one of the following: (1) a single size to use for all edges; or (2) an attribute in the initial igraph to be used to size the edges.
1 2 | addEdgeSize(sigmaObj, sizeAttr = NULL, minSize = 1, maxSize = 5,
oneSize = NULL)
|
sigmaObj |
A 'sigmaNet' object - created using the 'sigmaFromIgraph' function |
sizeAttr |
The attribute to use to create edge size (width) |
minSize |
The minimum size of the edges (for scaling) |
maxSize |
The maximum size of the edges (for scaling) |
oneSize |
A single size to use for all edges |
If the 2nd method is used, the minSize and maxSize attribute will control lower and upper bounds of the scaling function.
A 'sigmaNet' object with modified node labels. This object can be called directly to create a visualization, or modified by additional functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(igraph)
library(sigmaNet)
library(magrittr)
data(lesMis)
l <- layout_nicely(lesMis)
#specify a single edge size
sig <- sigmaFromIgraph(graph = lesMis, layout = l) %>%
addEdgeSize(oneSize = 5)
sig
#specify an attribute and min/max
sig <- sigmaFromIgraph(graph = lesMis, layout = l) %>%
addEdgeSize(sizeAttr = 'value', minSize = .1, maxSize = 2)
sig
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.