matrix_graph: Plotting a matrix graph

View source: R/matrix_graph.R

matrix_graphR Documentation

Plotting a matrix graph

Description

This function plots the matrix graph of a bipartite network. Configuration parameters and results are stored in a global environment called mat. This environment is not destroyed after the function is executed, so the developer can store it in a configuration file, retrieve

Usage

matrix_graph(
  datadir,
  filename,
  style = "matrix",
  orderby = "kradius",
  label_strguilda = "Plant",
  label_strguildb = "Pollinator",
  label_size = 18,
  color_guild_a = "#4169E1",
  color_guild_b = "#FF1808",
  color_links = "grey7",
  flip_matrix = FALSE,
  links_weight = FALSE,
  show_species_names = TRUE,
  show_title = TRUE,
  show_legend = TRUE,
  print_to_file = FALSE,
  plotsdir = "plot_results/",
  plot_size = 10,
  ppi = 300,
  progress = NULL
)

Arguments

datadir

the name of the file of the interaction matrix

filename

the file with the interaction matrix

label_strguilda

string labels of guild a

label_strguildb

string labels of guild b

label_size

base label size

color_guild_a

default filling for nodes of guild_a

color_guild_b

default filling for nodes of guild_b

color_links

color of matrix interactions

flip_matrix

to switch row/column guilds,

links_weight

show links weight as a gradient of color for weighted networks

show_species_names

add species name to number,

show_title

show network name as plot title,

show_legend

show guilds legend,

print_to_file

print plot to file,

plotsdir

default print directory

plot_size

in inches for printed plot,

ppi

dots per inch

progress

for interactive visualization

orderkcoremaxby

sets order of nodes, by kradius, kdegree or degree


jgalgarra/kcorebip documentation built on June 14, 2025, 12:33 a.m.