plot3d {mully}R Documentation

Plot the graph in 3D using rgl

Description

Plot the graph in 3D using rgl

Usage

plot3d(
  g,
  layers = TRUE,
  vertex.label = NA,
  vertex.label.color = NA,
  vertex.plac = "circle",
  edge.color = NA,
  edge.width = 5,
  edge.arrow.size = 10,
  edge.arrow.width = 1
)

Arguments

g

The input graph

layers

A boolean whether to add the layers or not

vertex.label

The vertices' labels

vertex.label.color

The vertices' colors. If not specified, the colors will be chosen randomly

vertex.plac

The placement form of the vertices on the layer. Can either be "circle" which will place them on a circle, or "disc" which will place them randomly on a disc. The default is "circle"

edge.color

The edges' colors. If not specified, inter-edges are black, and intra-edges have the same color as the nodes on the layer

edge.width

The edge width. Default set to 5.

edge.arrow.size

The edges' arrow size. Default set to 10

edge.arrow.width

The edges' arrow width. Default set to 1

Value

No return value. A 3D plot of the given graph is created.

Note

This function can take the following arguments supported and not ignored by rglplot: vertex.label, vertex.label.color, edge.color, edge.width, edge.arrow.size,edge.arrow.width.

Examples

g=mully::demo()
labels=getNodeAttributes(g)$name
plot3d(g, layers=TRUE, vertex.label=labels,edge.width=6)

[Package mully version 2.1.38 Index]