plotligraph: Manipulate 'plotly' into making a 3D render of an 'igraph'...

Description Usage Arguments Value Examples

View source: R/plotligraph.R

Description

Works by drawing a scatter3d of the vertices and tracing each edge with its own scatter3d. Procs one RColorBrewer palette warning per edge, but don't worry about it.

Usage

1
plotligraph(graph_obj, layout = NA, ...)

Arguments

graph_obj

'igraph' object

layout

optional 'igraph' layout matrix, preferably in 3 dimensions. Will generate with 'layout.fruchterman.reingold' and dim = 3 otherwise.

...

additional arguments passed to 'plot_ly'.

Value

plot_ly object

Examples

1
2
3
4
5
6
7
8
library("plotly")
library("igraph")
library("plotligraph")

set.seed(1234)
graph <- barabasi.game(35)
E(graph)$name <- sample(letters, length(E(graph)), TRUE)
plotligraph(graph)

DexGroves/plotligraph documentation built on May 6, 2019, 2:13 p.m.