bjpolygon | R Documentation |
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.
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"), ...)
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 |
keep |
Proportion of points enclosed in the shape; passed to
|
kind |
Shape is either a convex hull ( |
criterion |
Criterion to remove extreme points from the hull
in |
linetopoint |
Draw line from the centre of the shape to the
coordinates in |
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 |
type |
Mark coordinate of |
... |
Other parameters passed to to marker of |
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.
Functions return invisibly NULL
.
peelhull
, peelellipse
,
polygon
for basic functions and
plot.bjnmds
and plot.bjnmds
and
plot.bjdbrda
for programmatic interface.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.