plot_signif: Plot histograms for randomizations

View source: R/plot_signif.R

plot_signifR Documentation

Plot histograms for randomizations

Description

Plot histograms for randomizations

Usage

plot_signif(x, colors = c("plum", "tomato4"), plotit = T)

Arguments

x

An object of class infomap_monolayer.

colors

The fill colors of the histograms.

plotit

Also show the plots?

Details

Use ggplot to plot two histograms for the values of the map equation L and the number of modules. Dashed line is the observed value. Because returned objects are ggplot objects, they can be modified.

Value

A list with objecst of class ggplot:

  • L_plot: Histogram for the map equation

  • m_plot: Histogram for the number of modules

See Also

ggplot2, infomap_monolayer

Examples

## Not run: 
network_object <- create_monolayer_network(bipartite::memmott1999, 
bipartite = TRUE, directed = FALSE, group_names = c('Animals','Plants'))
infomap_object <- run_infomap_monolayer(network_object, 
      infomap_executable='Infomap',
      flow_model = 'undirected',
      silent=TRUE, trials=20, two_level=TRUE, seed=123, 
      signif = TRUE, shuff_method = 'r00', nsim = 50)

#get plots and plot them
x <- plot_signif(infomap_object, plotit = TRUE)

# Can modify the plots with ggplot2
x$L_plot+
theme_bw()+
theme(legend.position='none', 
     axis.text = element_text(size=20), 
     axis.title = element_text(size=20))


## End(Not run)

Ecological-Complexity-Lab/infomap_ecology_package documentation built on June 6, 2024, 5:28 a.m.