Skip to contents

This function colors the long edges in a triangular mesh plot based on a benchmark value.

Usage

colour_long_edges(.data, benchmark_value, triangular_object, distance_col)

Arguments

.data

The data frame containing the edge information.

benchmark_value

The threshold value to determine long edges.

triangular_object

The triangular object containing the mesh information.

distance_col

The column name in `.data` representing the distances.

Value

A ggplot object with the triangular mesh plot where long edges are colored differently.

Examples

num_bins_x <- 4
shape_value <- 1.833091
hexbin_data_object <- extract_hexbin_centroids(nldr_df = s_curve_noise_umap,
num_bins = num_bins_x, shape_val = shape_value)
df_bin_centroids <- hexbin_data_object$hexdf_data
tr1_object <- triangulate_bin_centroids(df_bin_centroids, x, y)
tr_from_to_df <- generate_edge_info(triangular_object = tr1_object)
distance_df <- cal_2d_dist(tr_from_to_df)
colour_long_edges(.data = distance_df, benchmark_value = 5.4,
triangular_object = tr1_object, distance_col = "distance")