The orientation of a principal components axis is entirely arbitrary, and can vary with implementation. It doesn't matter at all.
Your code was hugely mangled by posting in HTML - see below. Sarah On Mon, Nov 4, 2019 at 12:33 PM Marco Besozzi <marco.bes...@gmail.com> wrote: > > Can't understand why with clusplot() and fviz_cluster() functions I obtain > two x-axis mirror graphs. That's the code... > > > *mydata <- USArrests* > > > > > > > > > > > > > > *z <- scale(mydata)## clustering MacQueen (k-means )#fit <- kmeans(z, 4, > algorithm = c("MacQueen"), nstart=50)#library(cluster)windows()clusplot(z, > fit$cluster, labels=3, lines=0, cex=0.6, col.txt="black", > col.p="black")#library(factoextra)windows()fviz_cluster(fit, data=z)#* > > Thanks if someone has a suggestion! > > --------------------------------------------------------------- > Marco Besozzi, MD > --------------------------------------------------------------- > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Sarah Goslee (she/her) http://www.numberwright.com ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.