Visualizes a graph using a given affinity matrix and node layout.
VisualizeGraph(affinity_m, label = NULL, layout)
Arguments
- affinity_m
matrix; symmetric affinity matrix of the graph.
- label
vector; node labels (optional). Default is NULL.
- layout
matrix; a 2D coordinate matrix of cells to visualize the graph.
Value
A ggplot2 object representing the plotted graph.
Examples
affinity_m <- matrix(runif(100), nrow = 10)
layout <- matrix(runif(20), nrow = 10)
label <- sample(letters[1:3], 10, replace = TRUE)
plot <- VisualizeGraph(affinity_m, label, layout)
print(plot)