Add edge arrows to a directed graph. Due to complexities of writing custom renderers in webGL, we are stuck with one arrow:edge size ratio. In other words, you can only affect the edge arrow size by making the edges bigger.
addEdgeArrows(sigmaObj)
sigmaObj | A 'sigmaNet' object - created using the 'sigmaFromIgraph' function |
---|
A 'sigmaNet' object with added edge arrows. This object can be called directly to create a visualization, or modified by additional functions.
This is only applicable for directed graphs - if you run this on an undirected graph, you'll get an error.
library(igraph)#> #>#>#> #>#>#> #>library(sigmaNet) library(magrittr) g <- graph.formula(A-+B,B-+C,A-+C) layout <- matrix(c(2,1, 1,0, 3,0),byrow=TRUE,nrow=3) sig <- sigmaFromIgraph(g, layout = layout) sig %>% addEdgeSize(oneSize = 6) %>% addEdgeArrows()