Convert coordinates of a point in ternary space, in the format (a, b, c), to x and y coordinates of Cartesian space, which can be sent to standard functions in the 'graphics' package.
TernaryCoords(
abc,
b_coord = NULL,
c_coord = NULL,
direction = getOption("ternDirection", 1L),
region = getOption("ternRegion", ternRegionDefault)
)
# S3 method for class 'matrix'
TernaryToXY(
abc,
b_coord = NULL,
c_coord = NULL,
direction = getOption("ternDirection", 1L),
region = getOption("ternRegion", ternRegionDefault)
)
# S3 method for class 'numeric'
TernaryToXY(
abc,
b_coord = NULL,
c_coord = NULL,
direction = getOption("ternDirection", 1L),
region = getOption("ternRegion", ternRegionDefault)
)
TernaryToXY(
abc,
b_coord = NULL,
c_coord = NULL,
direction = getOption("ternDirection", 1L),
region = getOption("ternRegion", ternRegionDefault)
)A vector of length three giving the position on a ternary plot
that points in the direction specified by direction (1 = up, 2 = right,
3 = down, 4 = left). c(100, 0, 0) will plot in the direction-most
corner; c(0, 100, 0) will plot in the corner clockwise of direction;
c(0, 0, 100) will plot in the corner anti-clockwise of direction.
Alternatively, the a coordinate can be specified as the first parameter,
in which case the b and c coordinates must be specified via b_coord
and c_coord.
Or, a matrix with three rows, representing in turn the a, b and c
coordinates of points.
The b coordinate, if abc is a single number.
The c coordinate, if abc is a single number.
(optional) Integer specifying the direction that the current ternary plot should point: 1, up; 2, right; 3, down; 4, left.
(optional) Named list of length two specifying the the
minimum and maximum values of each ternary axis to be drawn
(e.g. list(min = c(40, 0, 0), max = c(100, 60, 60));
or a set of coordinates in a format accepted by TernaryPoints().
The plotted region will correspond to the smallest equilateral triangle
that encompasses the specified ranges or coordinates.
TernaryCoords() returns a vector of length two that converts
the coordinates given in abc into Cartesian (x, y) coordinates
corresponding to the plot created by the last call of TernaryPlot().
Other coordinate translation functions:
ReflectedEquivalents(),
TriangleCentres(),
XYToTernary()