newsamples {biplotEZ}R Documentation

Aesthetics for supplementary (new) biplot samples

Description

This function allows formatting changes to new samples.

Usage

newsamples (bp,  col = "darkorange1", pch = 1, cex = 1, label = FALSE,
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)

Arguments

bp

an object of class biplot.

col

new sample colour, with default darkorange1.

pch

new sample plotting character, with default o.

cex

new sample character expansion, with default 1.

label

logical, whether samples should be labelled or not, with default FALSE.

label.col

vector of length number of new samples with the colour of the labels, defaulting to the colour of the sample points.

label.cex

label text expansion, with default 0.75.

label.side

side of the plotting character where label appears, with default bottom. Note that unlike the argument pos in text(), options are "bottom", "left", "top", "right" and not 1, 2, 3, 4.

label.offset

offset of the label from the data point. See ?text for a detailed explanation of the argument offset.

connected

logical, whether samples are connected in order of rows of data matrix, with default FALSE.

connect.col

colour of the connecting line, with default black.

connect.lty

line type of the connecting line, with default 1.

connect.lwd

line width of the connecting line, with default 1.

Value

A list with the following components is available:

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.

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.

Examples

biplot(data = iris[1:145,]) |> PCA() |> samples(col = "grey") |>
interpolate(newdata = iris[146:150,]) |> newsamples(col = rainbow(6), pch=15) |> plot()

[Package biplotEZ version 1.2.0 Index]