Learn R Programming

mully (version 2.1.38)

plot3d: 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
)

Value

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

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

Examples

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

Run the code above in your browser using DataLab