dendPlot.communities

0th

Percentile

Community structure dendrogram plots

Plot a hierarchical community structure as a dendrogram.

Keywords
graphs
Usage
## S3 method for class 'communities':
dendPlot(x, mode = getIgraphOpt("dend.plot.type"),
   ..., use.modularity = FALSE)
Arguments
x
An object containing the community structure of a graph. See communities for details.
mode
Which dendrogram plotting function to use. See details below.
...
Additional arguments to supply to the dendrogram plotting function.
use.modularity
Logical scalar, whether to use the modularity values to define the height of the branches.
Details

dendPlot supports three different plotting functions, selected via the mode argument. By default the plotting function is taken from the dend.plot.type igraph option, and it has for possible values:

  • autoChoose automatically between the plotting functions. Asplot.phylois the most sophisticated, that is choosen, whenever theapepackage is available. Otherwiseplot.hclustis used.
  • phyloUseplot.phylofrom theapepackage.
  • hclustUseplot.hclustfrom thestatspackage.
  • dendrogramUseplot.dendrogramfrom thestatspackage.

The different plotting functions take different sets of arguments. When using plot.phylo (mode="phylo"), we have the following syntax: dendPlot(x, mode="phylo", colbar = rainbow(11, start=0.7, end=0.1), edge.color = NULL, use.edge.length = FALSE, \dots) The extra arguments not documented above:

  • colbarColor bar for the edges.
  • edge.colorEdge colors. IfNULL, then thecolbarargument is used.
  • use.edge.lengthPassed toplot.phylo.
  • dotsAttitional arguments to pass toplot.phylo.

The syntax for plot.hclust (mode="hclust"): dendPlot(x, mode="hclust", rect = 0, colbar = rainbow(rect), hang = 0.01, ann = FALSE, main = "", sub = "", xlab = "", ylab = "", \dots) The extra arguments not documented above:

  • rectA numeric scalar, the number of groups to mark on the dendrogram. The dendrogram is cut into exactlyrectgroups and they are marked via therect.hclustcommand. Set this to zero if you don't want to mark any groups.
  • colbarThe colors of the rectanges that mark the vertex groups via therectargument.
  • hangWhere to put the leaf nodes, this corresponds to thehangargument ofplot.hclust.
  • annWhether to annotate the plot, theannargument ofplot.hclust.
  • mainThe main title of the plot, themainargument ofplot.hclust.
  • subThe sub-title of the plot, thesubargument ofplot.hclust.
  • xlabThe label on the horizontal axis, passed toplot.hclust.
  • ylabThe label on the vertical axis, passed toplot.hclust.
  • dotsAttitional arguments to pass toplot.hclust.

The syntax for plot.dendrogram (mode="dendrogram"): dendPlot(x, \dots) The extra arguments are simply passed to as.dendrogram.

Value

  • Returns whatever the return value was from the plotting function, plot.phylo, plot.dendrogram or plot.hclust.

concept

  • Dendrograms
  • Community structure

Aliases
  • dendPlot.communities
Examples
karate <- graph.famous("Zachary")
fc <- fastgreedy.community(karate)
dendPlot(fc)
Documentation reproduced from package igraph, version 0.6.5-2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.