plot.nipals: Plot NIPALS basic results

View source: R/plot.nipals.R

plot.nipalsR Documentation

Plot NIPALS basic results

Description

Plot method for objects of class "nipals". This function plots either the variables or the observations, on the selected components (i.e. scores). Variables are plotted inside the circle of correlations. Observations are plotted on a scatter plot.

Usage

  ## S3 method for class 'nipals'
 plot(x, what = "variables",
    comps = c(1, 2), cex = 1, col.labels = "#5592e3",
    pos = NULL, offset = 0.1, col.arrows = "#5b9cf255",
    lwd = 3.5, length = 0, angle = 0,
    col.points = "#5592e3", pch = 21, pt.bg = "#5b9cf255",
    show.names = FALSE, xpd = TRUE, xlab = NULL,
    ylab = NULL, main = NULL, col.main = "gray35",
    cex.main = 1.2, col.axis = "gray40", show.grid = TRUE,
    col.grid = "gray95", ...)

Arguments

x

An object of class "nipals".

what

What to plot. Options are "variables" and "observations"

comps

An integer vector of length two to indicate which components to plot

cex

Character expansion for labels and points.

col.labels

Color for labels of variables.

pos

Position for the labels text (see par).

offset

When pos is specified, this value gives the offset of the labels.

col.arrows

Color for the arrows when plotting variables.

lwd

The line width of arrows.

length

Length of the edges of the arrow head (in inches).

angle

Angle from the shaft of the arrow to the edge of the arrow head.

col.points

Color for the points when what="observations".

pch

Plotting character symbol to use (see par).

pt.bg

Background (fill) color for the points given by pch=21:25.

show.names

Logical indicating whether to show names of points. Only used when what="observations"

xpd

Logical for controlling clipping region of labels and names.

xlab

Title for the x axis.

ylab

Title for the y axis.

main

Main title of the plot.

col.main

Color of main title.

cex.main

Character expansion of main title.

col.axis

Color of axis annotations (tick marks and labels).

show.grid

Logical indicating whether to show grid lines.

col.grid

Color of grid lines. Only used when show.grid=TRUE.

...

Further arguments are passed to labels or points.

Details

Variables are displayed using the correlations in $cor.xt.

Author(s)

Gaston Sanchez

See Also

nipals

Examples

## Not run: 
 # load data climbing ropes
 data(ropes)

 # apply nipals with 3 components
 nip1 = nipals(ropes[,-1], comps=3)

 # plot variables (correlations)
 plot(nip1)

 # plot observations
 plot(nip1, what="obs")

 # plot observations with names
 plot(nip1, what="obs", show.names=TRUE)
 
## End(Not run)

plsdepot documentation built on April 1, 2023, 12:04 a.m.