View source: R/plot_modular_matrix.R
plot_modular_matrix | R Documentation |
Plot a matrix with colored interactions by modules
plot_modular_matrix(
x,
fix_coordinates = T,
axes_titles = c("Set 1", "Set 2"),
transpose = F,
outside_module_col = "gray"
)
x |
An object of class |
fix_coordinates |
Should x and y coordinates be fixed by ggplot to create square cells. |
axes_titles |
Titles for axes |
transpose |
Option to transpose the matrix. Useful for matrices with very differnt numbers of rows and columns. |
outside_module_col |
Color of interactions outside modules. |
Use ggplot to plot a matrix in which cells (network interactions)
are colored. Interactions that fall outside the modules are colored in
outside_module_col
and those that fall inside the module are colored
by colors automatically generated by gg_color_hue
from package metafolio.
An object of class ggplot
.
ggplot2, infomap_monolayer
## Not run:
network_object <- create_monolayer_network(bipartite::memmott1999,
bipartite = TRUE, directed = FALSE, group_names = c('A','P'))
infomap_object <- run_infomap_monolayer(network_object, infomap_executable='Infomap',
flow_model = 'undirected',
silent=TRUE, trials=20, two_level=TRUE, seed=123)
plot_modular_matrix(infomap_object, fix_coordinates = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.