ACplot_graph: Plot undirected graph from matrix or vector

View source: R/ACutils_export.R

ACplot_graphR Documentation

Plot undirected graph from matrix or vector

Description

\loadmathjax

Given a (pxp)-matrix or a n_elem-dimensional vector, it plots the corresponding undirected graph.

Usage

ACplot_graph(
  G,
  col.links = "#3B9AB2",
  col.zeros = "grey95",
  graph.size = NULL,
  byrow = TRUE,
  main = " ",
  x_label = " ",
  y_label = " ",
  use_x11_device = TRUE
)

Arguments

G

it may be (pxp)-matrix, where p is the number or nodes or a vector containing the elements of the adiacency matrix. It is a vector, it may contain or not the diagonal elements. Its length should be equal to choose(p,2) if diagonal elements are not included or choose(p,2) + p if they are not included. Values should be 1 or 0.

col.links

the color of the links.

col.zeros

the color of the absent links, the zeros in the adiacency matrix.

graph.size

the number of nodes. Used only is G is a vector.

byrow

boolean, used only is G is a vector. Set TRUE if the elements of G are taken by row from its adiacency matrix. Set FALSE if they are taken by column.

main

the title of the plot.

x_label

the name of the x-axis in the plot.

y_label

the name of the y-axis in the plot.

use_x11_device

boolean, if x11() device has to be activated or not.

Value

this function does not return anything


alessandrocolombi/ACutils documentation built on March 3, 2023, 4:06 a.m.