Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bplot

General function for making biplots


Description

Function bplot creates biplots on the basis matrices of row and column markers.

Usage

bplot(Fr,G,rowlab=rownames(Fr),collab=rownames(G),qlt=rep(1,nrow(Fr)),
refaxis=TRUE,ahead=T,xl=NULL,yl=NULL,frame=F,qltlim=0,rowch=19,
colch=19,qltvar=NULL,rowcolor="red",colcolor="blue",rowmark=TRUE,
colmark=TRUE,rowarrow=FALSE,colarrow=TRUE,markrowlab=TRUE,
markcollab=TRUE,xlab="",ylab="",cex.rowlab=1,cex.rowdot=0.75,
cex.collab=1,cex.coldot=0.75,cex.axis=0.75,lwd=1,arrowangle=10,...)

Arguments

Fr

matrix with coordinates of the row markers.

G

matrix with coordinates of the column markers.

rowlab

vector with labels for the rows.

collab

vector with labels for the columns.

qlt

goodness of fit of the rows.

refaxis

draw coordinate system refaxis=TRUE or not.

ahead

put a head on the vectors ahead=TRUE or not.

xl

limits for the x-axis.

yl

limits for the y-axis.

frame

draw a box around the plot frame=TRUE or not.

qltlim

draw only the vectors with a goodness of fit larger than qltlim.

rowch

character used for the row markers.

colch

character used for the column markers.

qltvar

vector with the goodness of fit of each variable.

rowcolor

colour used for the row markers.

colcolor

colour used for the column markers.

rowmark

show row markers (rowmark=TRUE) or not.

colmark

show column markers (colmark=TRUE) or not.

rowarrow

draw vectors from the origin to the row markers (rowarrow=TRUE) or not.

colarrow

draw vectors from the origin to the column markers (colarrow=TRUE) or not.

markrowlab

depict row marker labels (rowlab=TRUE) or not.

markcollab

depict column marker labels (collab=TRUE) or not.

xlab

a label for the x-axis.

ylab

a label for the y-axis.

cex.rowlab

expansion factor for the row labels.

cex.rowdot

expansion factor for the row markers.

cex.collab

expansion factor for the column labels.

cex.coldot

expansion factor for the column markers.

cex.axis

expansion factor for the axis.

lwd

line width for biplot vectors.

arrowangle

angle for the edges of the arrowhead.

...

extra arguments for plot.

Value

None. The function produces a graphic.

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

Examples

set.seed(123)
X <- matrix(runif(40),byrow=TRUE,ncol=4)
colnames(X) <- paste("X",1:ncol(X),sep="")
out.pca <- princomp(X,cor=TRUE)
Fp <- out.pca$scores
Gs <- as.matrix(unclass(out.pca$loadings))
bplot(Fp,Gs,colch=NA)

calibrate

Calibration of Scatterplot and Biplot Axes

v1.7.7
GPL-2
Authors
Jan Graffelman <jan.graffelman@upc.edu>
Initial release
2020-06-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.