Plot the distribution of pairwise TCRdist distances
Source:R/plot_distances.R
plot_distance_distribution.RdHistogram with overlaid density curve of the upper triangle of a pairwise
distance matrix. A vertical dashed line marks the median distance.
When threshold is provided, a red vertical line is drawn at that
value with a label.
Arguments
- dist_matrix
Numeric matrix or numeric vector. If a square matrix, the upper triangle is extracted; if a vector, used directly.
- title
Optional plot title.
- binwidth
Numeric. Histogram bin width. If
NULL, uses ggplot2 default.- threshold
Numeric or
NULL. If notNULL, a vertical line is drawn at this distance value and labeled.