Learn R Programming

dimensio (version 0.9.0)

prepare_plot: Prepare Data for Plotting

Description

Prepare Data for Plotting

Usage

prepare_plot(
  x,
  margin,
  ...,
  axes = c(1, 2),
  active = TRUE,
  sup = TRUE,
  principal = TRUE,
  extra_quali = NULL,
  extra_quanti = NULL,
  color = NULL,
  fill = FALSE,
  symbol = NULL,
  size = c(1, 6),
  line_type = NULL,
  line_width = size
)

Value

A data.frame with the following columns:

x

Coordinates along x.

y

Coordinates along y.

extra_quali

Extra qualitative variable to be highlighted.

extra_quanti

Extra quantitative variable to be highlighted.

label

Label.

sup

Is supplementary?

col

Color for lines and symbols.

bg

Background color for symbols.

pch

Symbols.

cex

Symbol sizes.

lty

Line types.

lwd

Line widths.

Arguments

x

A MultivariateAnalysis object.

margin

A length-one numeric vector giving the subscript which the data will be returned: 1 indicates individuals/rows (the default), 2 indicates variables/columns.

...

Further graphical parameters.

axes

A length-two numeric vector giving the dimensions to be plotted.

active

A logical scalar: should the active observations be plotted?

sup

A logical scalar: should the supplementary observations be plotted?

principal

A logical scalar: should principal coordinates be returned? If FALSE, standard coordinates are returned.

extra_quali

An optional vector of qualitative data for aesthetics mapping.

extra_quanti

An optional vector of quantitative data for aesthetics mapping. If a single character string is passed, it must be one of "observation", "mass", "sum", "contribution" or "cos2" (see augment()).

color

The colors for lines and points (will be mapped to extra_quanti or extra_quali; if both are set, the latter has priority). Ignored if set to FALSE.

fill

The background colors for points (will be mapped to extra_quanti or extra_quali; if both are set, the latter has priority). Ignored if set to FALSE.

symbol

A vector of plotting characters or symbols (will be mapped to extra_quali). This can either be a single character or an integer code for one of a set of graphics symbols. If symbol is a named a named vector, then the symbols will be associated with their name within extra_quali. Ignored if set to FALSE.

size

A length-two numeric vector giving range of possible sizes (greater than 0; will be mapped to extra_quanti). Ignored if set to FALSE.

line_type

A specification for the line type (will be mapped to extra_quali). If line_type is a named a named vector, then the line types will be associated with their name within extra_quali. Ignored if set to FALSE.

line_width

A specification for the line type and width (will be mapped to extra_quanti). Ignored if set to FALSE.

Author

N. Frerebeau