Learn R Programming

ggtern (version 1.0.5.0)

coord_tern: Ternary Coordinate System

Description

coord_tern is a function which creates a transformation mechanism between the ternary system, and, the cartesian system. It inherits from the fixed coordinate system, employing fixed ratio between x and y axes once transformed.

Usage

coord_tern(T = getOption("tern.default.T"), L = getOption("tern.default.L"),
  R = getOption("tern.default.R"), xlim = c(0, 1), ylim = c(0, 1),
  Tlim = NULL, Llim = NULL, Rlim = NULL, clockwise)

Arguments

T
the Top Mapping (default ['x', 'y' or 'z'] stored in global option 'tern.default.T')
L
the Left Mapping (default ['x', 'y' or 'z'] stored in global option 'tern.default.L')
R
the Right Mapping (default ['x', 'y' or 'z'] stored in global option 'tern.default.R')
xlim
the range of x in the cartesian space
ylim
the range of y in the cartesian space
Tlim
the range of T in the ternary space
Llim
the range of L in the ternary space
Rlim
the range of R in the ternary space
clockwise
DEPRECIATED, replaced by individual theme element, see axis.tern.clockwise.

Value

  • coord_tern returns a ternary coordinate system object.

Aesthetics (Required in Each Layer)

[results=rd,stage=build]{ggtern:::rd_aesthetics("coord", "tern")}

Additional Points to Note
{ It is important to note that once the coord_tern() coordinate system has been applied, the base plot object is no longer strictly a ggplot object, rather, a ggtern object where several patches have been applied to facilitate correct plotting.

Abovementioned limitations include the types of geometries which can be used (ie approved geometries), or modifications to required aesthetic mappings. One such essential patch is, for approved geometries previously requiring x and y coordinates, now require an additional z coordinate, and, geom_segment goes one step further in that it requires both an additional z and zend coordinate mappings.

In essence, the required aesthetics are the product between what is required of the 'layer' and what is required of the 'coordinate system'. }