Description Usage Arguments Value Author(s) Examples
attach node coloring information to a graphNEL instance
1 | colorNodes(g, nodeAss, pal, attgen)
|
g |
graphNEL instance |
nodeAss |
color map for nodes: vector with elements evaluating to colors and nodes as element names |
pal |
a palette (use colorRampPalette for color interpolation) |
attgen |
attribute generating function – pwayRendAttrs is prototype |
a graphNEL instance with additional rendering data
Vince Carey <stvjc@channing.harvard.edu>
1 2 3 4 5 6 7 | example(randomGraph)
nn = nodes(g1)
x = runif(length(nn))
names(x) = nn
h1 = colorNodes(g1, x, colorRampPalette(brewer.pal(9, "Blues"))(length(nn)),
pwayRendAttrs)
h1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.