View source: R/graph_plot_compar.R
graph_plot_compar  R Documentation 
The function enables to compare two spatial graphs by plotting them highlighting the topological similarities and differences between them. Both graphs should share the same nodes and cannot be directed graphs.
graph_plot_compar(x, y, crds)
x 
A graph object of class 
y 
A graph object of class 
crds 
A

The graphs x
and y
of class igraph
must have
node names (not necessarily in the same order as IDs in crds,
given a merging is done).
A ggplot2 object to plot
P. Savary
data(pts_pop_ex) data(data_ex_genind) mat_w < mat_gen_dist(data_ex_genind, dist = "DPS") mat_dist < mat_geo_dist(data = pts_pop_ex, ID = "ID", x = "x", y = "y") mat_dist < mat_dist[order(as.character(row.names(mat_dist))), order(as.character(colnames(mat_dist)))] g1 < gen_graph_topo(mat_w = mat_w, topo = "mst") g2 < gen_graph_topo(mat_w = mat_w, mat_topo = mat_dist, topo = "gabriel") g < graph_plot_compar(x = g1, y = g2, crds = pts_pop_ex)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.