Adds pie charts over nodes in a network plot to visualize node attributes.

add_pie(x, p, sf, coord, cols, r = NULL, pielabel = NULL, ...)

Arguments

x

A network object or adjacency matrix.

p

A matrix of proportions for each slice (rows = slices, columns = nodes).

sf

Vertex scaling factor.

coord

A matrix of x and y coordinates for the nodes.

cols

A vector or matrix of colors for the pie slices.

r

Optional radius for each pie chart (default is sf/10).

pielabel

Optional list of arguments for pie.labels().

...

Additional arguments passed to gplot().

Value

A network plot with pie charts added to nodes.