R/plotPath.R
colorVertexByAttr.Rd
This function returns a list of colors for vertices, assigned similar colors if they share a common attribute (ex: in the same pathway, etc).
colorVertexByAttr(graph, attr.name, col.palette = palette())
A list of colors (in HEX format) for vertices.
Other Plotting methods:
layoutVertexByAttr()
,
plotAllNetworks()
,
plotClassifierROC()
,
plotClusterMatrix()
,
plotCytoscapeGML()
,
plotNetwork()
,
plotPathClassifier()
,
plotPaths()
data("ex_kgml_sig")
v.colors <- colorVertexByAttr(ex_kgml_sig, "pathway")
#> This graph was created by an old(er) igraph version.
#> ℹ Call `igraph::upgrade_graph()` on it to use with the current igraph version.
#> For now we convert it on the fly...
plotNetwork(ex_kgml_sig, vertex.color=v.colors)