plot_network_structure: Plot Network Structure

View source: R/visualization.R

plot_network_structureR Documentation

Plot Network Structure

Description

Creates a visualization of the dissimilarity matrix as a network graph, showing data availability patterns and connectivity between points.

Usage

plot_network_structure(
  network_results,
  output_file = NULL,
  width = 3000,
  height = 3000,
  dpi = 300
)

Arguments

network_results

The list output from analyze_network_structure().

output_file

Character. An optional full path to save the plot. If NULL, the plot is not saved.

width

Numeric. Width in pixels for saved plot (default: 3000).

height

Numeric. Height in pixels for saved plot (default: 3000).

dpi

Numeric. Resolution in dots per inch (default: 300).

Value

A ggplot object representing the network graph.

Examples

# Create a sample dissimilarity matrix
adj_mat <- matrix(runif(25), 5, 5)
rownames(adj_mat) <- colnames(adj_mat) <- paste0("Point", 1:5)
adj_mat[lower.tri(adj_mat)] <- t(adj_mat)[lower.tri(adj_mat)]
diag(adj_mat) <- 0
net_analysis <- analyze_network_structure(adj_mat)

# Create and display the plot
plot_network_structure(net_analysis)


topolow documentation built on Aug. 31, 2025, 1:07 a.m.