addEdgeArrows: Add edge arrows to a 'sigmaNet' object.

Description Usage Arguments Details Value Examples

Description

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.

Usage

1
addEdgeArrows(sigmaObj)

Arguments

sigmaObj

A 'sigmaNet' object - created using the 'sigmaFromIgraph' function

Details

This is only applicable for directed graphs - if you run this on an undirected graph, you'll get an error.

Value

A 'sigmaNet' object with added edge arrows. This object can be called directly to create a visualization, or modified by additional functions.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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()

iankloo/sigmaNet documentation built on May 13, 2019, 1:37 a.m.