Learn R Programming

loop (version 1.1)

gplot1: plot directed graphs directly from square graph matrix

Description

don't need to convert square graph matrix into edge form compared to the function "gplot"

Usage

gplot1(gemat,arrow=TRUE,lty=1,col=8,weighted=TRUE)

Arguments

gemat
standard square graph matrix
arrow
add arrows or not, from the starting node to the ending node, default is TRUE.
lty
line style for the links/edges, default is 1.
col
color for the links/edges, default is 8 (grey).
weighted
if TRUE, the links/edges will be weighted based on the cell value present in the matrix of gemat, different edges then will have different line widths for representing them. Otherwise, all edges have the same line width. Default is TRUE

References

Chen Y (2012) loop: an R package for performing decomposition of weighted directed graphs, food web analysis and flexible network plotting. Submitted.

See Also

gplot, fplot, groupplot,

Examples

Run this code
mat=matrix(c(0,5,3,7,0,5,0,8,0,4,3,8,0,1,6,7,0,1,0,2,0,4,6,2,0),5,5)
gplot1(gemat=mat) #other parameters are set in default

Run the code above in your browser using DataLab