inetplot {inetwork}R Documentation

Network or Graph Plotting

Description

Given the communities identified by icommunity, the plotting algorithm places the communities with decreasing community sizes along a spiral, in an effort to show the modular structure of the network. The vertices belonging to a community are arranged on a circle at the designated position on the spiral. The radii of the circles are proportional to the community sizes.

Usage

inetplot(clusters, theta = 30, shaft = 1, circle = TRUE, singlets = FALSE, 
         labels = TRUE, edges = TRUE, points = TRUE, shadow = TRUE)

Arguments

clusters an object returned from the network partitioning function icommunity
theta angle in degree between neighboring communities on the spiral
shaft a scaling factor for the radius of the spiral
circle a logical to indicate whether to position the vertices in a community on a circle (default) or a spiral
singlets a logical to turn off (default) displaying isolated vertices
labels a logical to show vertex labels (default) or not
edges a logical to draw an edge between connected vertices (by default) or not
points a logical to draw dots on vertices (by default) or not
shadow a logical to color the between-community edges in gray (default) or black. Within-community edges are in black.

Details

The Cartesian coordinates of community i on the spiral are given by

xi = shaft * (i-1) * cos(i*theta)

yi = shaft * (i-1) * sin(i*theta)

where i is the ith largest community in the network. The pitch angle theta is set by the argument theta. If circle=FALSE, the vertices of a community are arranged along a spiral originating from the designated position on the backbone spiral. The theta and shaft apply to the backbone as well as to the component spirals.

Author(s)

Sun-Chong Wang

See Also

icommunity, ihierarchy

Examples

## load example networks
data(icashflow)

## identify the communities within the network
partite7 <- icommunity(cf7,labelcf7,partite=TRUE)

## arrange the communities on a spiral
inetplot(partite7,shaft=10,circle=TRUE,labels=FALSE)

## arrange the community members along component spirals
inetplot(partite7,shaft=50,circle=FALSE,labels=TRUE,points=FALSE)

## show the isolated vertices
inetplot(partite7,shaft=10,points=FALSE,singlets=TRUE)

[Package inetwork version 1.1 Index]