[R] Replacing labels with symbols in biplot

Sarah Goslee sarah.goslee at gmail.com
Mon Dec 18 12:53:17 CET 2006


Hi Mat,

You can more-or-less do what you want with the xlabs argument to
biplot. It only takes characters, rather than the normal plot symbol
codes, though. If you need symbols, you can "cheat" with things like
+ o x. I usually use letters for the different groups within the data:

> temp <- matrix(runif(50), nrow=10)
> temp.pca <- princomp(temp)
> biplot(temp.pca, xlabs=c("A", "A", "B", "B", "B", "C", "C", "C", "D", "D"))
>

Sarah

On 12/17/06, Mat.Vanderklift at csiro.au <Mat.Vanderklift at csiro.au> wrote:
> Dear all
> I would like to replace labels for x in biplot() with symbols (points)
> that will visually illustrate different classes/groups.

-- 
Sarah Goslee
http://www.stringpage.com
http://www.functionaldiversity.org



More information about the R-help mailing list