View source: R/visualization.R
plot_network_structure | R Documentation |
Creates a visualization of the dissimilarity matrix as a network graph, showing data availability patterns and connectivity between points.
plot_network_structure(
network_results,
output_file = NULL,
width = 3000,
height = 3000,
dpi = 300
)
network_results |
The list output from |
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). |
A ggplot
object representing the network graph.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.