Convert igraph to use pie node shapes

igraph2pieGraph(
  g,
  valueIM = NULL,
  valueIMcolors = NULL,
  colorV = NULL,
  updateLabels = FALSE,
  maxNchar = 62,
  backgroundColor = "white",
  seed = 123,
  defineLayout = FALSE,
  repulse = 3.6,
  removeNA = FALSE,
  NAvalues = c(NA, "transparent"),
  verbose = FALSE,
  ...
)

Details

This function converts an igraph to use pie node shapes, where pie wedges are colored using values derived from a numeric matrix valueIM or pre-defined in a character matrix containing colors valueIMcolors.

Note that pie wedge sizes are equally-sized and do not vary by score, instead the color intensity is applied to each pie wedge.

Node names using V(g)$name matching rownames(valueIMcolors) are colorized and the node shape is converted to pie. All other nodes are not modified.

When valueIMcolors is not defined, it is derived from valueIM using colorjam::matrix2heatColors(). In that case, colorV defines the color used for numeric values in each column, and other options are passed to colorjam::matrix2heatColors() via ... arguments.