community_plot {CommKern}R Documentation

Communities by layer plot

Description

Generate a graphical representation of the communities and layers.

Usage

community_plot(x, ...)

Arguments

x

a spinglass_net object created by hms

...

additional arguments from other methods

Details

This is an ancillary function that creates the plots seen in the manuscript, with a heatmap-style plot on the top panel, derived from a network adjacency matrix, and a community assignment plot on the bottom panel, separated by layer.

Value

a gtable object

See Also

link{hms}

Examples


data(SBM_net)


# plot with max of two layers
SBM_netcomm <- hms(
  input_net  = SBM_net,
  spins      = 4,
  alpha      = 0,
  coolfact   = 0.90,
  tol  = 0.05,
  max_layers = 2
  )

community_plot(SBM_netcomm)



# plot with three layers
# don't run automatically on CRAN; > 5 seconds
SBM_netcomm <- hms(
  input_net  = SBM_net,
  spins      = 4,
  alpha      = 0,
  coolfact   = 0.90,
  tol  = 0.05,
  max_layers = 3
  )

community_plot(SBM_netcomm)



[Package CommKern version 1.0.1 Index]