[R] "biplot" graphical options?

Andris Jankevics andza at osi.lv
Wed Sep 2 14:31:53 CEST 2009


Hi, You can make a biplot on Your own, it is not so hard. And in this
case You can change parameters for every low level function as You
wish.

PC <- prcomp (iris[,1:4])
lambda <- PC$sdev * sqrt(nrow(PC$x))
plot (t(t(PC$x)/lambda),pch=16,col=as.numeric(iris[,5]))
par (new=T)
Rot <- t(t(PC$rotation)*lambda)
XLIM <- c(-max(abs(Rot[,1])),max(abs(Rot[,1])))
XLIM <- XLIM+(XLIM*0.1)
plot(Rot,col=4,axes=FALSE,xlim=XLIM,ylim=XLIM,pch="")
arrows (rep(0,nrow(PC$rotation)),rep(0,nrow(PC$rotation)),Rot[,1],Rot[,2],col=4)
text (Rot[,1:2],rownames(Rot),col=6)
axis (3)
axis (4)

Best regards,
Andris

On Wed, Sep 2, 2009 at 1:02 PM, Manca Marco
(PATH)<m.manca at path.unimaas.nl> wrote:
>
> Dear R-help fellows
>
> good afternoon.
>
> I am struggling in the attempt to impose some graphical conditions (changing point symbols, colors, etc) to biplot function (I am using it to visualize the results of princomp) but I can't apparently manage to change anything but the axis... and I have been browsing manuals and vignettes without finding any explicit suggestions on how to operate...
>
> Can anyone, please, point my attention to the relevant documentation?
>
> Thank you in advance and best regards,
> Marco
>
> --
> Marco Manca, MD
> University of Maastricht
> Faculty of Health, Medicine and Life Sciences (FHML)
> Cardiovascular Research Institute (CARIM)
> PO Box 616
> 6200 MD Maastricht
>
> E-mail: m.manca at path.unimaas.nl
> Office telephone: +31(0)433874633
> Personal mobile: +31(0)626441205
> Twitter: @markomanka
>
>
> *********************************************************************************************************************
>
> This email and any files transmitted with it are confide...{{dropped:15}}
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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