Create and style a blank ternary plot.
TernaryPlot( atip = NULL, btip = NULL, ctip = NULL, alab = NULL, blab = NULL, clab = NULL, lab.offset = 0.16, lab.col = NULL, point = "up", clockwise = TRUE, xlim = NULL, ylim = NULL, lab.cex = 1, lab.font = 0, tip.cex = lab.cex, tip.font = 2, tip.col = "black", isometric = TRUE, atip.rotate = NULL, btip.rotate = NULL, ctip.rotate = NULL, atip.pos = NULL, btip.pos = NULL, ctip.pos = NULL, padding = 0.08, col = NA, panel.first = NULL, panel.last = NULL, grid.lines = 10, grid.col = "darkgrey", grid.lty = "solid", grid.lwd = par("lwd"), grid.minor.lines = 4, grid.minor.col = "lightgrey", grid.minor.lty = "solid", grid.minor.lwd = par("lwd"), axis.lty = "solid", axis.labels = TRUE, axis.cex = 0.8, axis.font = par("font"), axis.rotate = TRUE, axis.pos = NULL, axis.tick = TRUE, axis.lwd = 1, ticks.lwd = axis.lwd, ticks.length = 0.025, axis.col = "black", ticks.col = grid.col, ... ) HorizontalGrid( grid.lines = 10, grid.col = "grey", grid.lty = "dotted", grid.lwd = par("lwd"), direction = getOption("ternDirection", 1L) )
Character string specifying text to title corners,
proceeding clockwise from the corner specified in
point (default: top).
Character string specifying text with which to label
the corresponding sides of the triangle.
Left or right-pointing arrows are produced by
\\U2192, or using
expression('value' %->% '').
Numeric specifying distance between midpoint of axis label
and the axis.
padding if labels are being clipped.
Use a vector of length three to specify a different offset for each label.
Character vector specifying colours for axis labels. Use a vector of length three to specify a different colour for each label.
Character string specifying the orientation of the ternary plot:
should the triangle point
The integers 1 to 4 can be used in place of the character strings.
Logical specifying the direction of axes. If
default), each axis runs from zero to its maximum value in a clockwise
direction around the plot.
Numeric vectors of length 2 specifying the minimum and maximum
x and y limits of the plotted area, to which
padding will be added.
The default is to display the complete height or width of the plot.
Allows cropping to magnified region of the plot. (See vignette for diagram.)
May be overridden if
isometric=TRUE; see documentation of
Numeric specifying character expansion (font size) for axis labels. Use a vector of length three to specify a different value for each direction.
Numeric specifying font style (Roman, bold, italic, bold-italic) for axis titles. Use a vector of length three to set a different font for each direction.
Logical specifying whether to enforce an equilateral shape
for the ternary plot.
If only one of
ylim is set, the other will be calculated to
maintain an equilateral plot.
ylim are set, but have different ranges, then the limit
with the smaller range will be scaled until its range matches that of the
Integer specifying number of degrees to rotate label of rightmost apex.
Integer specifying positioning of labels,
iff the corresponding
xlab.rotate parameter is set.
Numeric specifying size of internal margin of the plot; increase if axis labels are being clipped.
The colour for filling the plot; see
An expression to be evaluated after the plot axes are
set up but before any plotting takes place.
This can be useful for drawing backgrounds, e.g. with
Note that this works by lazy evaluation: passing this argument from other
plot methods may well not work since it may be evaluated too early.
An expression to be evaluated after plotting has taken
place but before the axes and box are added. See the comments about
Integer specifying the number of grid lines to plot.
Colours to draw the grid lines. Use a vector of length three to set different values for each direction.
Character or integer vector; line type of the grid lines. Use a vector of length three to set different values for each direction.
Non-negative numeric giving line width of the grid lines. Use a vector of length three to set different values for each direction.
Integer specifying the number of minor (unlabelled) grid lines to plot between each major pair.
Line type for both the axis line and tick marks. Use a vector of length three to set a different value for each direction.
This can either be a logical value specifying whether (numerical) annotations are to be made at the tickmarks, or a character or expression vector of labels to be placed at the tick points.
Numeric specifying character expansion (font size) for axis labels. Use a vector of length three to set a different value for each direction.
Font for text. Defaults to
Logical specifying whether to rotate axis labels
to parallel grid lines, or numeric specifying custom rotation for each axis,
to be passed as
srt parameter to
text(). Expand margins or set
par(xpd = NA) if labels are clipped.
Vector of length one or three specifying position of axis
labels, to be passed as
pos parameter to
text(); populated automatically
NULL (the default).
Logical specifying whether to mark the axes with tick marks.
Line width for the axis line and tick marks. Zero or negative values will suppress the line or ticks. Use a vector of length three to set different values for each axis.
Numeric specifying distance that ticks should extend beyond the plot margin. Also affects position of axis labels, which are plotted at the end of each tick. Use a vector of length three to set a different length for each direction.
Colours for the axis line,
tick marks and tip labels respectively.
Use a vector of length three to set a different value for each direction.
axis.col = NULL means to use
par('fg'), possibly specified
ticks.col = NULL means to use whatever colour
axis.col resolved to.
Additional parameters to
(optional) Integer specifying the direction that the current ternary plot should point: 1, up; 2, right; 3, down; 4, left.
grid.lines horizontal lines to the ternary plot
TernaryPlot( atip = "Top", btip = "Bottom", ctip = "Right", axis.col = "red", col = rgb(0.8, 0.8, 0.8) ) HorizontalGrid(grid.lines = 2, grid.col = "blue", grid.lty = 1) # the second line corresponds to the base of the triangle, and is not drawn