plot_radial_distance {STDistance} | R Documentation |
Radial Distance Visualization with Collision Avoidance
Description
Creates a radial plot with automatic label placement to prevent overlaps between nodes and text labels.
Usage
plot_radial_distance(
distance_result,
reference_type,
id_col = "barcode",
scale_radius = 1,
show_labels = TRUE,
palette = "Set2",
label_padding = 0.15,
center_label_expansion = 1.5
)
Arguments
distance_result |
Data.frame from calculate_nearest_distances() |
reference_type |
Name of the reference cell type (center node) |
id_col |
Name of ID column (default: "barcode") |
scale_radius |
Scaling factor for layout (default: 1) |
show_labels |
Whether to show distance labels (default: TRUE) |
palette |
Color palette name (default: "Set2") |
label_padding |
Radial padding for labels (default: 0.15) |
center_label_expansion |
Center expansion for labels (default: 1.5) |
Value
A ggplot2 object
Examples
plot_radial_distance(distance_results,id_col = "Newbarcode",
reference_type = "Macrophages",label_padding = 0.3,
show_labels = TRUE,palette = "Dark2")
[Package STDistance version 0.6.6 Index]