plotCluster | R Documentation |
Plot a cluster network with all the nodes and edges - the central node is marked by a black circle. The radius of each point corresponds to its degree. The opacity corresponds to the percentage of edges from the node that is in the cluster (the darker it is, the larger the percentage of edges is within the cluster.) The distance from the center corresponds to the relative dissimilarity with the central node. This is computed as the number of neighbors the node and the central node do not have in common.
plotCluster( AdjMat, clustNo, clusterInfo = NULL, labels = FALSE, nodecol = "blue", labelsize = 1, figtitle = NULL, edgecols = "grey88" )
AdjMat |
An adjacency Matrix (0/1). |
clustNo |
The chosen cluster. |
clusterInfo |
Obtained from graphComponents. |
labels |
If set to TRUE, show node names (default=FALSE). |
nodecol |
The color(s) of the nodes. Can be a single value or a vector of length equal to the number of rows in AdjMat |
labelsize |
Text size of node labels. |
figtitle |
The title of the plot (default=NULL). |
edgecols |
The colors to be used for edges. Default="grey88". If one value is given, all edges will be drawn using this color. If edgecol contains two valid colors, the first is used for positive correlations, and the second for negative ones. |
## Not run: data(SIM,package = "betaMix") res <- betaMix(betaMix::SIM, maxalpha = 1e-5,ppr = 0.01,subsamplesize = 30000, ind=TRUE) adjMat <- getAdjMat(res, signed=TRUE) SimComp <- graphComponents(adjMat) plotCluster(adjMat, 2, SimComp) plotCluster(adjMat, 2, SimComp, edgecols = c("blue","orange"), labels=TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.