Hi I would like to make the color of the chart border to black. However, the following command doesn't work plot(res.pca, choix="ind", border="black") Any way to fix that? Regards, Mahmood
Changing chart border's color
5 messages · Mahmood Naderan-Tahan, Rasmus Liland
Hi, it would be useful to know how you created res.pca. https://rdrr.io/r/graphics/box.html Rasmus -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20210309/02f945e5/attachment.sig>
Hi Rasmus, Please see the following commands. The box fails.
library("FactoMineR")
mydata <- read.csv('test.csv', header=T,row.names=1)
res.pca = PCA(mydata, quali.sup=5, graph=F)
plot(res.pca, choix="ind")
box(col='black')
Error in box(col = "black") : plot.new has not been called yet Regards, Mahmood
From: Rasmus Liland <jral at posteo.no>
Sent: Tuesday, March 9, 2021 8:16:24 PM
To: Mahmood Naderan-Tahan
Cc: r-help at r-project.org
Subject: Re: [R] Changing chart border's color
Sent: Tuesday, March 9, 2021 8:16:24 PM
To: Mahmood Naderan-Tahan
Cc: r-help at r-project.org
Subject: Re: [R] Changing chart border's color
Hi, it would be useful to know how you created res.pca. https://rdrr.io/r/graphics/box.html Rasmus
Please add test.csv using dput ?
Right, adding a black border around a plot in R is meaningless. There is also another circular plot being created everytime FactoMineR::PCA runs. It might be (perhaps, idk) fruitful for you to look at the contents of res.pca using str and create the PCA plot yourself using ggplot2 ... or maybe plotly inside a shiny app .... -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20210310/b201c9ab/attachment.sig>