TernaryCoords {Ternary} | R Documentation |
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) ) ## S3 method for class 'matrix' TernaryToXY( abc, b_coord = NULL, c_coord = NULL, direction = getOption("ternDirection", 1L) ) ## S3 method for class 'numeric' TernaryToXY( abc, b_coord = NULL, c_coord = NULL, direction = getOption("ternDirection", 1L) ) TernaryToXY( abc, b_coord = NULL, c_coord = NULL, direction = getOption("ternDirection", 1L) )
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. |
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()
.
Martin R. Smith (martin.smith@durham.ac.uk)
Other coordinate translation functions:
ReflectedEquivalents()
,
TriangleCentres()
,
XYToTernary()
TernaryCoords(100, 0, 0) TernaryCoords(c(0, 100, 0)) coords <- matrix(1:12, nrow = 3) TernaryToXY(coords)