# Example relatedness matrix
set.seed(123)
mat <- matrix(runif(100, 0, 1), nrow = 10)
rownames(mat) <- paste0("ID", 1:10)
colnames(mat) <- paste0("ID", 1:10)
# Plot the relatedness matrix
ggRelatednessMatrix(mat,
config = list(
matrix_color_palette = c("white", "gold", "red"),
color_scale_midpoint = 0.5,
matrix_cluster = TRUE,
plot_title = "Relatedness Matrix",
axis_x_label = "Individuals",
axis_y_label = "Individuals",
axis_text_size = 8
)
)
Run the code above in your browser using DataLab