Learn R Programming

ggtern (version 1.0.1.3)

element_ternary: Theme element: ternary structure

Description

Used to define the layout of some of the ggtern plot features which are unique to the ternary diagrams , and hence, this package.

Usage

element_ternary(showarrows = TRUE, padding = 0.1,
    arrowsep = 0.075, arrowstart = 0.3, arrowfinish = 0.7,
    vshift = 0.25 * padding, hshift = 0,
    ticklength.major = 0.02, ticklength.minor = 0.01)

Arguments

showarrows
logical whether to show the axis directional arrows
padding
the padding around the plot area to make provision for axis labels, ticks and arrows, relative to the cartesian plane.
arrowsep
the distance between ternary axis and ternary arrows
arrowstart
the proportion along the ternary axis to start the directional arrow
arrowfinish
the proportion along the ternary axis to stop the directional arrow
vshift
shift the plot area vertically
hshift
shift the plot area horizontally
ticklength.major
the length of the major ternary ticks as an euclidean distance relative to the x and y limits of the cartesian plot area.
ticklength.minor
the length of the minor ternary ticks as an euclidean distance relative to the x and y limits of the cartesian plot area.

Details

Note that some of these items, unlike ggplot2 which permits absolute distances (ie say unit(1,"cm")) via the grid package, are instead defined as a relative length to the limits imposed by the underlying x and y axes.

For example, the ternary axes are rendered directly onto the plot area, (rather than using an exclusive grid component) and since the x limits (unless changed) are between [0,1], then a relative length of 0.02 represents a length that is approximately 2% of the plot edges from tip to tip. Elements which are subject to this include the padding, arrowsep, ticklength.major and ticklength.minor. This is perhaps not ideal, however, seemed to be a necessary sacrifice in order to produce these plots.