rectifyPiegraph: Convert pie igraph node shapes to coloredrectangle

rectifyPiegraphR Documentation

Convert pie igraph node shapes to coloredrectangle

Description

Convert pie igraph node shapes to coloredrectangle

Usage

rectifyPiegraph(
  g,
  nrow = 2,
  ncol = 5,
  byrow = TRUE,
  whichNodes = seq_len(igraph::vcount(g)),
  ...
)

Arguments

g

igraph object, expected to contain one or more nodes with shape "pie".

nrow, ncol

integer values indicating the default number of rows and columns to use when displaying the colors for each node.

byrow

logical indicating whether each vector of node colors should fill the nrow,ncol matrix by each row, similar to how values are filled in base::matrix() with argument byrow.

whichNodes

integer vector of nodes in g which should be considered. Only nodes with shape "pie" will be converted which are also within the whichNodes vector. By default, all nodes are converted, but whichNodes allows converting only a subset of nodes.

...

additional arguments are ignored.

Details

This function simply converts an igraph network with "pie" node shapes, to use the "coloredrectangle" node shape provided by the multienrichjam package.

In the process, it transfers related node attributes:

  • "pie.color" are copied to "coloredrect.color"

  • "pie.names" are copied to "coloredrect.names". The "coloredrect.names" can be used to label a color key.

  • "size" is converted to "size2" after applying sqrt(size) * 1.5. The "size2" value is used to define the size of coloredrectangle nodes.

Value

igraph object where node shapes were changed from "pie" to "coloredrectangle".

See Also

Other jam igraph functions: cnet2df(), cnet2im(), cnetplotJam(), cnetplot_internalJam(), color_edges_by_nodegroups(), color_edges_by_nodes_deprecated(), color_edges_by_nodes(), color_nodes_by_nodegroups(), communities2nodegroups(), drawEllipse(), edge_bundle_bipartite(), edge_bundle_nodegroups(), enrichMapJam(), fixSetLabels(), flip_edges(), get_bipartite_nodeset(), igraph2pieGraph(), jam_igraph(), jam_plot_igraph(), label_communities(), layout_with_qfrf(), layout_with_qfr(), mem2emap(), memIM2cnet(), mem_multienrichplot(), nodegroups2communities(), relayout_with_qfr(), removeIgraphBlanks(), removeIgraphSinglets(), reorderIgraphNodes(), rotate_igraph_layout(), spread_igraph_labels(), subgraph_jam(), subsetCnetIgraph(), subset_igraph_components(), sync_igraph_communities(), with_qfr()


jmw86069/multienrichjam documentation built on Nov. 3, 2024, 10:29 p.m.