plotNetwork | R Documentation |
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.
plotNetwork(
graph,
vertex.color,
col.palette = palette(),
layout = layout.auto,
legend = TRUE,
...
)
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 |
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 |
Produces a plot of the network.
Ahmed Mohamed
Other Plotting methods:
colorVertexByAttr()
,
layoutVertexByAttr()
,
plotAllNetworks()
,
plotClassifierROC()
,
plotClusterMatrix()
,
plotCytoscapeGML()
,
plotPathClassifier()
,
plotPaths()
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.