Description Usage Arguments Value Author(s) See Also Examples
This function returns a list of colors for vertices, assigned similar colors if they share a common attribute (ex: in the same pathway, etc).
1 | colorVertexByAttr(graph, attr.name, col.palette = palette())
|
graph |
An annotated igraph object. |
attr.name |
The attribute name (ex: "pathway") by which vertices will be colored. Complex attributes, where a vertex belongs to more than one group, are supported. |
col.palette |
A color palette, or a palette generating function (ex: col.palette=rainbow ). |
A list of colors (in HEX format) for vertices.
Ahmed Mohamed
Other Plotting methods: layoutVertexByAttr
,
plotAllNetworks
,
plotClassifierROC
,
plotClusterMatrix
,
plotCytoscapeGML
,
plotNetwork
,
plotPathClassifier
, plotPaths
1 2 3 | data("ex_kgml_sig")
v.colors <- colorVertexByAttr(ex_kgml_sig, "pathway")
plotNetwork(ex_kgml_sig, vertex.color=v.colors)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.