I am new to R and I am trying to generate a series of figures for my clustering algorithm. Right now I am using the following code:
ggplot(df,aes(x=V1,y=V2)) +
geom_point(aes(colour = factor(cluster)),alpha=0.7) +
scale_colour_manual(values=c("purple", "green","orange","black")) +
ggtitle("Visualizing users and their K-Means Euclidean Clusters")
As you can see I have four clusters which are results of k-means. Now I want to show some text over my plot. For example in the following image:
I need the mean of each cluster (or any text like cluster labels) shown over it in this figure (for example 0.5 over the green area). I guess I should geom_text for this purpose but unfortunately I have no idea how. Any help is much appreciated.
Thanks