Learn R Programming

compositions (version 1.10-1)

coloredBiplot: A biplot providing somewhat easier access to details of the plot.

Description

This function generates a simple biplot out of various source and allows to color the objects individually. (Warning: This preliminary version is likely to be changed in next edition)

Usage

coloredBiplot(xrf, scale=1, choice=c(1,2), pc.biplot=FALSE, 
        xcol="black", ycol="red", xpch=4, ypch=1, cex=1, 
        xarrows=FALSE, yarrows=!xarrows, xnames=NULL, ynames=NULL,...)

Arguments

xrf
a representation of the the co-information to be plotted, given by a result of princomp, prcomp or svd
scale
the way to distribute the singular values on the right or left singular vectors (see biplot)
choice
the components to be plotted (see biplot)
pc.biplot
should be scaled by sqrt(nrow(X))? (see biplot)
xcol
The color(s) to draw the points (or arrows) of the first set
ycol
The color(s) to draw the points (or arrows) of the second set
xpch
the plot character for the first set
ypch
the plot character for the second set
cex
the usual cex parameter for plotting
xarrows
wether or not to plot the arrows for the first dataset
yarrows
wether or not to plot the arrows for the second dataset
xnames
The names to write for the points of the first set
ynames
The names to write for the points of the second set
...
further parameters for plot

Value

  • The function is called only for the sideeffect of plotting.

Details

The functions is provided for conveniance and is to be considered experimental.

See Also

biplot, plot.acomp

Examples

Run this code
data(SimulatedAmounts)
coloredBiplot(xrf=svd(var(sa.outliers5)),pc.biplot=FALSE,xpch=c(1,2,3),xcol=1:3,ycol=c("blue","cyan","magenta"))

Run the code above in your browser using DataLab