Hello
I carried out cluster analyzes on stations and species, and now I would like to represent my stations on a map in order to visualize the distribution of the different clusters.
I manage to do everything I want except assigning colors to clusters.
The "ZooK.asin.sqrt....K..6" column is the column that associates the cluster number with my stations.
The only color I manage to get with this code is a blue gradient so very inefficient to distinguish well
I tried with scale_fill_manual but it doesn't work...
How to do it ?
ggplot(data = world) +
geom_sf(fill= "antiquewhite") +
geom_point(data = df , aes(x = Longitude , y = Latitude), size = 3, shape = 21) +
geom_text_repel(data = df, aes(x = Longitude, y = Latitude, label = Station, colour = ZooK.asin.sqrt....K..6),
fontface = "bold", nudge_x = c(1, -1.5, 2, 2, -1), nudge_y = c(0.25,-0.25, 0.5, 0.5, -0.5)) +
coord_sf(xlim = c(-145, -40), ylim = c(54, 85), expand = FALSE) +
theme(panel.grid.major = element_line(color = gray(.5), linetype = "dashed", size = 0.5), panel.background = element_rect(fill = "aliceblue"))
Created on 2022-05-27 by the reprex package (v2.0.1)
Thanks very much