plot.homals: Plot Methods for Homals

View source: R/plot.homals.R

plot.homalsR Documentation

Plot Methods for Homals

Description

Various plotting options for objects of class "homals".

Usage

## S3 method for class 'homals'
plot(x, plot.type = "jointplot", plot.dim = c(1, 2), 
var.subset = "all", col.points = rainbow_hcl(ncol(x$data)), col.scores = "gray", 
col.lines = 1:x$ndim, cex.scores = 0.8, cex.loadings = 0.8, labels.scores = FALSE, 
stepvec = NA, max.plot.array = NA, asp = 1, main, xlab, ylab, xlim, ylim, ...)

Arguments

x

Object of class "homals"

plot.dim

Vector with dimensions to be plotted.

plot.type

String indicating which type of plot to be produced: "jointplot", "biplot", "screeplot", "transplot". See details.

var.subset

Numeric vector for subsetting variables to be plotted. If missing, all variables are taken into account

col.points

Color categories.

col.scores

Color object scores.

col.lines

Line colors for transformation and scree plot.

cex.scores

Size object scores.

cex.loadings

Size loading labels.

asp

Aspect ratio

labels.scores

Whether object score labels should be plotted.

stepvec

Vector whether step function should be plotted (see details).

max.plot.array

Number of panels in transformation plot.

main

Plot title.

type

Type of points/lines to be plotted.

xlab

Label of x-axis.

ylab

Label of y-axis.

xlim

Limits for x-axis.

ylim

Limits for y-axis.

...

Further plot arguments passed: see plot

Details

Plot description:

- Biplot (plot.type = "biplot"): Biplot with the object scores and the category quantifications.

- Transformation plot (plot.type = "transplot"): Plots the original scale against the transformed scale (first dimension) for each variable separately.

- Joint plot (plot.type = "jointplot"): Plots the category quantifications.

- Scree plot (plot.type = "screeplot"): Produces a scree plot based on the eigenvalues.

For transformation plots only: If stepvec = NA, the function tries to figure out which variable should be plotted as step function. Alternatively, a boolean vector (with length number of variables) can be specified (TRUE step function, FALSE smooth function).

Examples

fithart <- homals(hartigan, ndim = 3, normobj.z = FALSE)
fithart

plot(fithart)   
plot(fithart, var.subset = c(1,2,4), plot.dim = c(2,3))
plot(fithart, plot.type = "biplot", col.scores = "black")
plot(fithart, plot.type = "biplot", col.scores = "black", labels.scores = TRUE, col.points = 1:6)
plot(fithart, plot.type = "screeplot", col.lines = "red")
plot(fithart, plot.type = "transplot", plot.dim = 1:3, col.lines = c(1, 2, 4))
plot(fithart, plot.type = "transplot", stepvec = rep(FALSE, 6), max.plot.array = c(2,2))

Gifi documentation built on Sept. 28, 2022, 3 a.m.

Related to plot.homals in Gifi...