| TernaryCoords {Ternary} | R Documentation |
Convert ternary coordinates to Cartesian space
Description
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.
Usage
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)
)
Arguments
abc |
A vector of length three giving the position on a ternary plot
that points in the direction specified by |
b_coord |
The b coordinate, if |
c_coord |
The c coordinate, if |
direction |
(optional) Integer specifying the direction that the current ternary plot should point: 1, up; 2, right; 3, down; 4, left. |
region |
(optional) Named list of length two specifying the the
|
Value
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().
Author(s)
Martin R. Smith (martin.smith@durham.ac.uk)
See Also
Other coordinate translation functions:
ReflectedEquivalents(),
TriangleCentres(),
XYToTernary()
Examples
TernaryCoords(100, 0, 0)
TernaryCoords(c(0, 100, 0))
coords <- matrix(1:12, nrow = 3)
TernaryToXY(coords)