plotNetwork {NetPathMiner} | R Documentation

## Plots an annotated igraph object.

### Description

This function is a wrapper function for `plot.igraph`, with 2 main additions. 1. Add the ability to color vertices by their attributes (see examples), accompanied by an inofrmative legend. 2. Resize vertex.size, edge.arrow.size, label.cex according to the plot size and the size of the network.

### Usage

    plotNetwork(graph, vertex.color, col.palette = palette(),
      layout = layout.auto, legend = TRUE, ...)

### Arguments

`graph` | An annotated igraph object.
`vertex.color` | A list of colors for vertices, or an attribute names (ex: "pathway") by which vertices will be colored. Complex attributes, where a vertex belongs to more than one group, are supported. This can also be the output of `colorVertexByAttr`.
`col.palette` | A color palette, or a palette generating function (ex:
    col.palette=rainbow
).
`layout` | Either a graph layout function, or a two-column matrix specifiying vertex coordinates.
`legend` | Wheter to plot a legend. The legend is only plotted if vertices are colored by attribute values.
`...` | Additional arguments passed to `plot.igraph`.

### Value

Produces a plot of the network.

### Author(s)

Ahmed Mohamed

### See Also

Other Plotting methods: `colorVertexByAttr`, `layoutVertexByAttr`, `plotAllNetworks`, `plotClassifierROC`, `plotClusterMatrix`, `plotCytoscapeGML`, `plotPathClassifier`, `plotPaths`

### Examples

     data("ex_kgml_sig")
     plotNetwork(ex_kgml_sig, vertex.color="pathway")
     plotNetwork(ex_kgml_sig, vertex.color="pathway", col.palette=heat.colors)
     plotNetwork(ex_kgml_sig, vertex.color="pathway",
                 col.palette=c("red", "green","blue","grey"))

[Package NetPathMiner version 1.28.0 Index]