| 42333 |
ripley |
1 |
% File src/library/stats/man/biplot.Rd
|
| 68948 |
ripley |
2 |
% Part of the R package, https://www.R-project.org
|
| 74265 |
hornik |
3 |
% Copyright 1995-2018 R Core Team
|
| 42333 |
ripley |
4 |
% Distributed under GPL 2 or later
|
|
|
5 |
|
| 27474 |
ripley |
6 |
\name{biplot}
|
| 56186 |
murdoch |
7 |
\alias{biplot}
|
| 27474 |
ripley |
8 |
\alias{biplot.default}
|
|
|
9 |
\title{Biplot of Multivariate Data}
|
|
|
10 |
\usage{
|
|
|
11 |
biplot(x, \dots)
|
|
|
12 |
|
|
|
13 |
\method{biplot}{default}(x, y, var.axes = TRUE, col, cex = rep(par("cex"), 2),
|
|
|
14 |
xlabs = NULL, ylabs = NULL, expand = 1,
|
|
|
15 |
xlim = NULL, ylim = NULL, arrow.len = 0.1,
|
|
|
16 |
main = NULL, sub = NULL, xlab = NULL, ylab = NULL, \dots)
|
|
|
17 |
}
|
|
|
18 |
\arguments{
|
|
|
19 |
\item{x}{The \code{biplot}, a fitted object. For \code{biplot.default},
|
|
|
20 |
the first set of points (a two-column matrix), usually associated
|
|
|
21 |
with observations.}
|
|
|
22 |
\item{y}{The second set of points (a two-column matrix), usually associated
|
|
|
23 |
with variables.}
|
|
|
24 |
\item{var.axes}{If \code{TRUE} the second set of points have arrows
|
|
|
25 |
representing them as (unscaled) axes.}
|
|
|
26 |
\item{col}{A vector of length 2 giving the colours for the first and
|
|
|
27 |
second set of points respectively (and the corresponding axes). If a
|
|
|
28 |
single colour is specified it will be used for both sets. If
|
|
|
29 |
missing the default colour is looked for in the
|
|
|
30 |
\code{\link{palette}}: if there it and the next colour as used,
|
| 40284 |
ripley |
31 |
otherwise the first two colours of the palette are used.}
|
| 27474 |
ripley |
32 |
\item{cex}{The character expansion factor used for labelling the
|
|
|
33 |
points. The labels can be of different sizes for the two sets by
|
|
|
34 |
supplying a vector of length two.}
|
|
|
35 |
\item{xlabs}{A vector of character strings to label the first set of
|
| 86005 |
hornik |
36 |
points: the default is to use the row \I{dimname} of \code{x}, or
|
|
|
37 |
\code{1:n} if the \I{dimname} is \code{NULL}.}
|
| 27474 |
ripley |
38 |
\item{ylabs}{A vector of character strings to label the second set of
|
| 86005 |
hornik |
39 |
points: the default is to use the row \I{dimname} of \code{y}, or
|
|
|
40 |
\code{1:n} if the \I{dimname} is \code{NULL}.}
|
| 27474 |
ripley |
41 |
\item{expand}{An expansion factor to apply when plotting the second set
|
|
|
42 |
of points relative to the first. This can be used to tweak the
|
|
|
43 |
scaling of the two sets to a physically comparable scale.}
|
|
|
44 |
\item{arrow.len}{The length of the arrow heads on the axes plotted in
|
|
|
45 |
\code{var.axes} is true. The arrow head can be suppressed by
|
|
|
46 |
\code{arrow.len = 0}.}
|
|
|
47 |
\item{xlim, ylim}{Limits for the x and y axes in the units of the
|
|
|
48 |
first set of variables.}
|
|
|
49 |
\item{main, sub, xlab, ylab, \dots}{graphical parameters.}
|
|
|
50 |
}
|
|
|
51 |
\description{
|
|
|
52 |
Plot a biplot on the current graphics device.
|
|
|
53 |
}
|
|
|
54 |
\details{
|
|
|
55 |
A biplot is plot which aims to represent both the observations and
|
|
|
56 |
variables of a matrix of multivariate data on the same plot. There are
|
|
|
57 |
many variations on biplots (see the references) and perhaps the most
|
|
|
58 |
widely used one is implemented by \code{\link{biplot.princomp}}.
|
|
|
59 |
The function \code{biplot.default} merely provides the
|
|
|
60 |
underlying code to plot two sets of variables on the same figure.
|
|
|
61 |
|
| 39139 |
ripley |
62 |
Graphical parameters can also be given to \code{biplot}: the size of
|
|
|
63 |
\code{xlabs} and \code{ylabs} is controlled by \code{cex}.
|
| 27474 |
ripley |
64 |
}
|
|
|
65 |
\section{Side Effects}{
|
|
|
66 |
a plot is produced on the current graphics device.
|
|
|
67 |
}
|
|
|
68 |
\references{
|
| 88704 |
hornik |
69 |
\bibshow{R:Gabriel:1971,
|
|
|
70 |
R:Gower+Hand:1996}
|
| 27474 |
ripley |
71 |
}
|
|
|
72 |
\seealso{\code{\link{biplot.princomp}}, also for examples.}
|
|
|
73 |
\keyword{hplot}
|
|
|
74 |
\keyword{multivariate}
|