plotRobin: plotRobin

View source: R/ROBIN.R

plotRobinR Documentation

plotRobin

Description

This function plots two curves: the measure of the null model and the measure of the real graph or the measure of the two community detection algorithms.

Usage

plotRobin(
  graph,
  model1,
  model2,
  legend = c("model1", "model2"),
  title = "Robin plot"
)

Arguments

graph

The output of prepGraph

model1

The Mean output of the robinRobust function or the Mean1 output of robinCompare.

model2

The MeanRandom output of the robinRobust function or the Mean2 output of robinCompare.

legend

The legend for the graph. The default is c("model1", "model2"). If using robinRobust is recommended c("real data", "null model"), if using robinCompare, enter the names of the community detection algorithms.

title

The title for the graph. The default is "Robin plot".

Value

A ggplot object.

Examples

my_file <- system.file("example/football.gml", package="robin")
graph <- prepGraph(file=my_file, file.format="gml")
graphRandom <- random(graph=graph)
Proc <- robinRobust(graph=graph, graphRandom=graphRandom, method="louvain",
measure="vi", type="independent")
plotRobin(graph=graph, model1=Proc$Mean, model2=Proc$MeanRandom
, legend=c("real data", "null model"))


robin documentation built on May 17, 2022, 1:07 a.m.