Skip to contents

Plot (expected) adjacency matrices

Usage

plot_expectation(model)

plot_dense_matrix(A, ...)

plot_sparse_matrix(A)

Arguments

model

A directed_factor_model() or an undirected_factor_model() object.

A

A matrix(), Matrix::Matrix() or Matrix::sparseMatrix() object.

...

Unused.

Value

A ggplot2::ggplot2() plot.

Examples


set.seed(27)

model <- dcsbm(n = 10, k = 2, expected_density = 0.2)
#> Generating random degree heterogeneity parameters `theta` from a LogNormal(2, 1) distribution. This distribution may change in the future. Explicitly set `theta` for reproducible results.
#> Generating random mixing matrix `B` with independent Uniform(0, 1) entries. This distribution may change in the future. Explicitly set `B` for reproducible results.

plot_expectation(model)


A <- sample_sparse(model)

plot_sparse_matrix(A)