Message-ID: <f8ec6ca6-653b-1d75-f083-9578010ef580@gmail.com>
Date: 2021-02-05T16:01:44Z
From: Duncan Murdoch
Subject: Customizing plot
In-Reply-To: <c98405eab3a24d25b7dcc3f1a8293b16@ugent.be>
On 05/02/2021 10:44 a.m., Mahmood Naderan-Tahan wrote:
>
> Hi,
> 1- How can I assign different colors to different observations in the PCA chart? Assume, I have 10 observations and I want to use black color for the first 5 and read for the next 5 observations.
>
> Currently, I use
>
> ?res.pca = PCA(mydata[,1:37], scale.unit=TRUE, graph=T)
> ?plot(res.pca,axes=c(1,2))
>
>
>
> 2- How can I change the plot area size and font sizes? With these commands
>
> ?dev.new(width=20, height=4)
> ?plot(res.pca,axes=c(1,2))
>
> The final plot is not what I expected. Please see the picture at?https://imgur.com/UINTnv7
No need to post twice. You probably didn't get an answer the first time
because it was just an hour ago, and you didn't include "mydata" (or a
suitable subset) in your posting. For the best chance at getting a
helpful answer, post code that others can run.
Duncan Murdoch