mplot3_graph: Plot 'igraph' networks

View source: R/mplot3_graph.R

mplot3_graphR Documentation

Plot igraph networks

Description

Plot igraph networks

Usage

mplot3_graph(
  net,
  vertex.size = 12,
  vertex.col = NULL,
  vertex.alpha = 0.33,
  vertex.label.col = NULL,
  vertex.label.alpha = 0.66,
  vertex.frame.col = NA,
  vertex.label = NULL,
  vertex.shape = "circle",
  edge.col = NULL,
  edge.alpha = 0.2,
  edge.curved = 0.35,
  edge.width = 2,
  layout = c("fr", "dh", "drl", "gem", "graphopt", "kk", "lgl", "mds", "sugiyama"),
  coords = NULL,
  layout_params = list(),
  cluster = NULL,
  groups = NULL,
  cluster_params = list(),
  cluster_mark_groups = TRUE,
  mark.col = NULL,
  mark.alpha = 0.3,
  mark.border = NULL,
  mark.border.alpha = 1,
  cluster_color_vertices = FALSE,
  theme = rtTheme,
  theme_extra_args = list(),
  palette = rtPalette,
  mar = rep(0, 4),
  par.reset = TRUE,
  filename = NULL,
  pdf.width = 6,
  pdf.height = 6,
  verbose = TRUE,
  ...
)

Arguments

net

igraph network

vertex.size

Numeric: Vertex size

vertex.col

Color for vertices

vertex.alpha

Numeric: Transparency for vertex.col

vertex.label.col

Color for vertex labels

vertex.frame.col

Color for vertex border (frame)

vertex.label

Character vector: Vertex labels. Default = NULL, which will keep existing names in net if any. Set to NA to avoid printing vertex labels

vertex.shape

Character: Vertex shape. See igraph::plot.igraph("vertex.shape"). Default = "circle"

edge.col

Color for edges

edge.alpha

Numeric: Transparency for edges. Default = .2

edge.curved

Numeric: Curvature of edges. Default = .35

edge.width

Numeric: Edge thickness

layout

Character: one of: "fr", "dh", "drl", "gem", "graphopt", "kk", "lgl", "mds", "sugiyama", corresponding to all the available layouts in igraph

coords

Output of precomputed igraph layout. If provided, layout is ignored

layout_params

List of parameters to pass to layout function

cluster

Character: one of: "edge_betweenness", "fast_greedy", "infomap", "label_prop", "leading_eigen", "louvain", "optimal", "spinglass", "walktrap", corresponding to all the available igraph clustering functions

groups

Output of precomputed igraph clustering. If provided, cluster is ignored

cluster_params

List of parameters to pass to cluster function

cluster_mark_groups

Logical: If TRUE, draw polygons to indicate clusters, if groups or cluster defined

mark.col

Colors, one per group for polygon surrounding cluster. Note: You won't know the number of groups unless they are precomputed. The colors will be recycled as needed.

mark.alpha

Float [0, 1]: Transparency for mark.col.

mark.border

Colors, similar to mark.col for border

mark.border.alpha

Float [0, 1]: Transparency for mark.border.

cluster_color_vertices

Logical: If TRUE, color vertices by cluster membership.

theme

rtemis theme to use

theme_extra_args

List of extra arguments to pass to the theme function defined by theme. This argument is used when the extra args (...) are passed the plotting function (in this case igraph::plot.igraph) and not to the theme function

mar

Numeric vector, length 4: par's margin argument

par.reset

Logical: If TRUE, reset par before exiting.

filename

Character: If provided, save plot to this filepath

verbose

Logical, If TRUE, print messages to console.

...

Extra arguments to pass to igraph::plot.igraph()

Author(s)

E.D. Gennatas


egenn/rtemis documentation built on May 4, 2024, 7:40 p.m.