bjpolygon: Shapes to Display Scatter of Points in Multiple Ordinations

bjpolygonR Documentation

Shapes to Display Scatter of Points in Multiple Ordinations

Description

These are low-level functions that are used by plot functions to draw shapes enclosing a specified proportion of randomized points, or connecting certain proportion of them to the reference points. The functions are not usually called directly by users, but the plots can be modified with described arguments.

Usage

bjpolygon(
  xarr,
  x0,
  keep = 0.9,
  kind = c("hull", "ellipse"),
  criterion = "area",
  linetopoint = TRUE,
  col = "gray",
  alpha = 0.3,
  observed = TRUE,
  type = c("t", "p", "n"),
  ...
)

bjstars(xarr, x0, keep = 0.9, col = "gray", type = c("t", "p", "n"), ...)

Arguments

xarr

3-D array of coordinates of sampling units times two axes by random samples.

x0

2-D array of sampling units times two axes treated as constant for all samples in xarr.

keep

Proportion of points enclosed in the shape; passed to peelhull or peelellipse.

kind

Shape is either a convex hull (peelhull) or ellipse peelellipse enclosing keep proportion of xarr points.

criterion

Criterion to remove extreme points from the hull in peelhull and peelellipse.

linetopoint

Draw line from the centre of the shape to the coordinates in x0.

col

Colour of the shape; can be a vector of colours.

alpha

Transparency of shapes; 0 is completely transparent, and 1 is non-transparent.

observed

After finding the convex hull, extend hull to enclose fixed point x0.

type

Mark coordinate of x0 using "t"ext, "p"oint or "n"one.

...

Other parameters passed to to marker of type.

Details

Functions require output of three-dimensional array xarr of randomized scores, where the last dimension is for the random samples, and a two-dimensional matrix of references scores x0.

Function bjpolygon uses peelhull or peelellipse to find a convex hull (chull) or an ellipsoid hull (ellipsoidhull) containing keep proportion of points. The reference coordinates can also be added to the plot, either as point or a text label (ordiellipse) and optionally connected to the shape centre (not to the centre of points). With argument observed the convex hull can be extended to include the reference point when that is outside the hull; this is used to draw wedges for arrows using the origin as the reference point.

Function bjstars connects the reference point to keep proportion of closest points. If the reference point is not specified, the centre of points prior to selection will be used.

Value

Functions return invisibly NULL.

See Also

peelhull, peelellipse, polygon for basic functions and plot.bjnmds and plot.bjnmds and plot.bjdbrda for programmatic interface.


jarioksa/natto documentation built on March 28, 2024, 12:45 a.m.