compare_graphs {foodingraph}R Documentation

Compare two graphs

Description

From two graphs generated by graph_from_matrix or graph_from_links_nodes, displays two graphs with the same legend (edge weights and size and node degrees) to facilitate the visual comparison of the two graphs. NB : if you use node families, make sure they have the same families in the two graphs (this can be done by generating a same palette for both graphs using family_palette)

Usage

compare_graphs(graph1, graph2, titles = NULL, position = c("vertical",
  "horizontal"), n_nodes = 5, n_weights = 5,
  edge_width_range = c(0.2, 2), edge_alpha_range = c(0.4, 1),
  node_size_range = c(1, 10), unique_legend = TRUE)

Arguments

graph1

: the first graph

graph2

: the second graph

titles

(optional) : list of 2 : the two title of the graphs. Default are the graph titles from graph_from_matrix or graph_from_links_nodes.

position

: should the graphs be displayed vertically (use vertical, default) or horizontally (use horizontal).

n_nodes

: the number of nodes to be displayed in the legend. R will do its best to be around this number.

n_weights

: the number of weights to be displayed in the legend. R will do its best to be around this number.

edge_width_range

: range of the edges width (default is 0.2 to 2).

edge_alpha_range

: if edge_alpha is TRUE, the range of the alpha values (between 0 and 1). Default is 0.4 to 1.

node_size_range

: range of the node sizes. (default is 1 to 10)

unique_legend

: should there be a unique legend (default is TRUE) BE CAREFUL to have the same family colors if you use families/


[Package foodingraph version 0.1.0 Index]