plot_minium_spanning_tree: Plot Minimum Spanning Tree

View source: R/Visualizations_Network.R

plot_minium_spanning_treeR Documentation

Plot Minimum Spanning Tree

Description

Plots the minimum spanning tree of a given dataset.

Usage

plot_minium_spanning_tree(df, labels = NULL)

Arguments

df

A data frame with x and y coordinates.

labels

A vector of labels for each observation in df.

Value

A plot of the minimum spanning tree.

Examples


# create sample data
set.seed(123)
x <- rnorm(100)
y <- rnorm(100)
label <- sample(c("A", "B", "C"), 100, replace = TRUE)
df <- data.frame(x = x, y = y, label = label)

# plot the minimum spanning tree
plot_minimum_spanning_tree(df)


eisascience/scCustFx documentation built on June 2, 2025, 3:59 a.m.