0

i have a PCA and a clustering to do, on my final graph i want to label the point depending of what they're representing (image in my case)

here is my code:

PCA(X) #graph de la PCA
res_pca <- PCA(X,graph = F)
todoEM <- res_pca[["var"]][["coord"]][,1:2] #coordonnées en dim 1 et 2 de la PCA
row.names(todoEM) <- c("image 1","image 2","image 3","image 4")
todoEM

mod1 <- Mclust(todoEM) #EM
plot(mod1, what="classification") #result of EM

enter image description here

I can't find a way to label every point with the name of where they come from. i could find that the name are store in mod1 thanks to this command:

mod1[["classification"]]
image 1 image 2 image 3 image 4
1       1       2       3 

any idea ?

I never find any graph with this type of labeling and i don't achieve to do it by own.

Phil
  • 7,287
  • 3
  • 36
  • 66
  • Welcome to StackOverflow. Can you make your post [reproducible](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) by providing your data using `dput()` or an example built-in dataset like `mtcars`? – jrcalabrese Nov 28 '22 at 17:26

0 Answers0