[R] biplot.princomp - changing score labels
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Feb 25 09:21:23 CET 2009
On Tue, 24 Feb 2009, Axel Strauß wrote:
> OK, the one thing I figured out:
> Is should be like:
> biplot(test.pca, cex=c(2,1), col=c("red","green")...
> to change size, colours etc separately. But I still don't know how change
> lables of observations to symbols properly.
That's not part of the design of the function, so just make a copy and
edit to meet your fancies.
The designer of biplot.princomp.
>
> Tipps? Thanks again,
> Axel
>> Dear R helpers,
>>
>> When producing a PCA biplot, vectors of environmental variables (as red
>> arrows with labels) and scores of the observations (black labels
>> (observation names)) are plotted by default. How can I change the graphical
>> output? Let's say I would like that the scores are plottet only as symbols
>> and not text. The only solution I found was this post in the help archive
>> http://tolstoy.newcastle.edu.au/R/e2/help/06/12/7298.html
>> suggesting "cheating" like:
>> >biplot(test.pca, xlabs=c("0","0","0","0","0","0...
>> and using letters instead of symbols.
>> This works somehow, but I am still not able the change e.g. the colour or
>> size of only the scores. Whatever I try to do with "col=...", "cex=..." and
>> so on changes either all labels in the plot or none. Can someone tell me
>> what is the trick to only modify either the environmental variables or the
>> scores? Also e.g. the type of the arrow?
>>
>> Thanks in advance,
>> Axel
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list