samples {biplotEZ} | R Documentation |
Aesthetics for biplot samples
Description
This function allows formatting changes to samples.
Usage
samples (bp, which = 1:bp$g, col = ez.col, pch = 16, cex = 1,
label = FALSE, label.name = NULL, label.col=NULL, label.cex = 0.75,
label.side = "bottom", label.offset = 0.5,
connected=FALSE, connect.col = "black", connect.lty = 1,
connect.lwd = 1, opacity = 1)
Arguments
bp |
an object of class |
which |
vector of which groups of samples to display, with default |
col |
sample colour, with default |
pch |
sample plotting character, with default |
cex |
sample character expansion, with default |
label |
logical ( |
label.name |
vector of length number of samples, with default
|
label.col |
vector of length number of samples with the colour of the labels, defaulting to the colour of the sample points. |
label.cex |
label text expansion, with default |
label.side |
side of the plotting character where label appears, with default |
label.offset |
offset of the label from the data point. See ?text for a detailed explanation of the
argument |
connected |
logical, whether samples are connected in order of rows of data matrix, with default |
connect.col |
colour of the connecting line, with default |
connect.lty |
line type of the connecting line, with default |
connect.lwd |
line width of the connecting line, with default |
opacity |
opacity of sample points, with default 1 (opaque). |
Details
The arguments which
, col
, pch
and cex
are based on the specification of group.aes
or classes
. If no groups
are specified, a single colour, plotting character and / or character expansion is expected. If g groups are
specified, vectors of length g is expected, or values are recycled to length g.
The arguments label
, label.cex
, label.side
and label.offset
are based on the sample size n. A single value
will be recycled n times or a vector of length n is expected.
Value
A list with the following components is available:
which |
which means to display. |
col |
colour of the samples. |
pch |
plotting character of the samples. |
cex |
expansion of the plotting character of the samples. |
label |
TRUE or FALSE, whether samples should be labelled, with default
|
label.name |
If |
label.col |
colour of the label. |
label.cex |
expansion of the label. |
label.side |
side at which to plot the label of samples. |
label.offset |
offset of the label from the data point. |
connected |
TRUE or FALSE, whether samples should be connected in row order of X. |
connect.col |
colour of the connecting line. |
connect.lty |
line type of the connecting line. |
connect.lwd |
line width of the connecting line. |
opacity |
opacity of sample points, with default 1 (opaque). |
Examples
biplot(iris[,1:4]) |> PCA() |> samples(col="purple",pch=15, opacity=0.5) |> plot()
biplot(iris[,1:4]) |> PCA() |>
samples(col="purple",pch=NA, opacity=0.5, label = TRUE) |> plot()
biplot(iris[,1:4]) |> PCA() |>
samples(col="purple",pch=NA, opacity=0.5, label = TRUE,
label.name = paste("s:",1:150, sep="")) |>
plot()
biplot(iris[,1:4]) |> PCA() |>
samples(col="purple",pch=NA, opacity=0.5, label = "ggrepel") |> plot()