draw {lcd}R Documentation

Draw graph

Description

Draws a graph from its adjacency matrix.

Usage

draw(amat, plain = TRUE)

Arguments

amat the adjacency matrix of the graph.
plain logical value. If TRUE, then a plain plot is drawn for the graph; if FALSE, a tlkck plot is drawn.

Details

The function converts the adjacency matrix to an igraph object and uses the plot.igraph/tkplot function in igraph package to draw the graph. Special care is paid to make the directed/undirected edges displayed right. Finally, the function returns the vertex list of the graph for comparison to the vertex numbering used in the plot.

Value

The vertex list. The main output is the side effect of the function.

Author(s)

Zongming Ma and Xiangrui Meng


[Package lcd version 0.7-2 Index]