[R] biplot
David L Carlson
dcarlson at tamu.edu
Wed Jun 22 17:56:02 CEST 2016
I should have mentioned that the points are invisible without the labels and there is no way to use plot symbols. Something like this is probably what you wanted.
> biplot(prcomp(x), xlabs=rep("*", 50), ylabs=rep("", 10))
Gives you the arrows and asterisks for the points. But labeling them is not easy since the coordinates are based on the columns:
> par("usr")
[1] -6.705729 7.179791 -6.705729 7.179791
David C
-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of David L Carlson
Sent: Wednesday, June 22, 2016 10:44 AM
To: Shane Carey; r-help at r-project.org
Subject: Re: [R] biplot
The xlabs= (rows) and ylabs= (columns) arguments handle the labels, but they do not recycle so you need to specify values for each row and each column:
> set.seed(42)
> x <- matrix(rnorm(500), 50, 10)
> biplot(prcomp(x), xlabs=rep("", 50), ylabs=rep("", 10))
-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Shane Carey
Sent: Wednesday, June 22, 2016 7:39 AM
To: r-help at r-project.org
Subject: [R] biplot
Hey,
Does anyone know how to remove labels from a biplot? I want to input them
manually as they are currently overlapping.
Thanks
--
Le gach dea ghui,
Shane
[[alternative HTML version deleted]]
______________________________________________
R-help at 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.
______________________________________________
R-help at 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.
More information about the R-help
mailing list