Using HCPC, a function of FactoMineR for clustering, how can we change the text legend of an HCPC plot? Exactly, how to change "cluster 1","cluster 2" etc. with a text vector we specified (legend.txt as a vector) Here the code which works
cai<-PCA(iris[,-5])
res.hcpc2 <- HCPC(pcai, graph = FALSE)
plot(res.hcpc2, choice = "3D.map", title= "mapping site clusters "))
If we try to change the legend
leg.txt <- c("SE", "VE", "VI")
plot(res.hcpc2, choice = "3D.map", title= "mapping site clusters ", legend=leg.txt))
we get an error message "legend is not a graphical parameter", and the text of the legend is not changed. Thanks