Another way to plot network structure based on similar vertex will be grouped together, while dissimilar nodes/vertex will depart from each others.

Share:

Description

The method for seperating the nodes in the two-dimensional spaces is the non-dimensional scaling technique, which can take the similarity matrices of the nodes as the input and generate the positions of the nodes in the space.

Usage

1
fplot(gemat,type="both",metric="jaccard",addlabels=FALSE,scaled=TRUE,weighted=TRUE,pch=20,bg=1,pcex=3,pcol=4,lty=1,lcol=8,tfont=12,tcol=1)

Arguments

gemat

standard graph square matrix

type

if type="both", the node similarity is calculated based on the the vertex similarity from the inward/outward links for each pair of nodes. if type="in", the node similarity is calculated based on the the vertex similarity from the inward links for each pair of nodes. if type="out", the node similarity is calculated based on the the vertex similarity from the outward links for each pair of nodes.

metric

node similarity methods, currently supporting two basic similarity indices: "jaccard" and "sorensen".

addlabels

if you want to label each node/vertex, set it's status as TRUE; default is FALSE

scaled

if you want to the links showing relative weights, set it's status as TRUE; default is FALSE links with larger weights will have thicker line width, vice versa.

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

pch

this pch is for nodes/vertex

bg

bg is for nodes/vertex filled background colors, will function when pch=21:25.

pcex

pcex is for nodes/vertex size

pcol

pcol is for nodes/vertex color

lty

lty is the line style for the links

lcol

lcol is the line color for the links

tfont

tfont is the font size for the labels of the nodes

tcol

tcol is the color for the labels of the nodes

Author(s)

Youhua Chen <haydi@126.com>

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

fplot.foodweb, groupplot.foodweb, gplot, gplot1, groupplot

Examples

1
2
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)
fplot(gemat=mat) #other parameters are set in default

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.