colorNodes: attach node coloring information to a graphNEL instance

Description Usage Arguments Value Author(s) Examples

Description

attach node coloring information to a graphNEL instance

Usage

1
colorNodes(g, nodeAss, pal, attgen)

Arguments

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

Value

a graphNEL instance with additional rendering data

Author(s)

Vince Carey <stvjc@channing.harvard.edu>

Examples

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

pathRender documentation built on Nov. 8, 2020, 8:03 p.m.