Skip to content

Commit

Permalink
dendrogram cluster colors
Browse files Browse the repository at this point in the history
  • Loading branch information
savvas-paragkamian committed Jun 2, 2024
1 parent 6760779 commit d628c3e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions scripts/isd_crete_numerical_ecology.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,20 @@ hc_df <- as.data.frame(cutree(hc,k=6)) |>
as_tibble()
colnames(hc_df) <- c("ENA_RUN", "cluster")

cluster_cols=c("1"="#999999",
"2"="#BE81A3",
"3"="#56B4E9",
"4"="#009E73",
cluster_cols=c("#D55E00", "#F0E442","#009E73", "#56B4E9", "#BE81A3", "#999999")

cluster_cols=c("1"="#009E73",
"2"="#56B4E9",
"3"="#999999",
"4"="#BE81A3",
"5"="#F0E442",
"6"="#D55E00")

dend <- as.dendrogram(hc) |>
color_branches(k = 6, col=cluster_cols) |>
color_labels(k = 6, col=cluster_cols)
set("labels_col", value = cluster_cols, k=6) |>
set("branches_k_color", value = cluster_cols, k = 6)
#color_branches(k = 6, col=cluster_cols) |>
#color_labels(k = 6, col=cluster_cols)

png(file=paste0("figures/clustering_bray_hclust_samples.png"),
width = 55,
Expand Down

0 comments on commit d628c3e

Please sign in to comment.