geom_interpolate_tern {ggtern} | R Documentation |
Ternary Interpolation
Description
This is the heavily requested geometry for interpolating between ternary values, results being rendered using contours on a ternary mesh.
Usage
geom_interpolate_tern(
mapping = NULL,
data = NULL,
stat = "InterpolateTern",
position = "identity",
...,
method = "auto",
formula = value ~ poly(x, y, degree = 1),
lineend = "butt",
linejoin = "round",
linemitre = 1,
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE
)
stat_interpolate_tern(
mapping = NULL,
data = NULL,
geom = "interpolate_tern",
position = "identity",
...,
method = "auto",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
n = 80,
formula = value ~ poly(x, y, degree = 1),
base = "ilr"
)
Arguments
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
position |
Position adjustment, either as a string naming the adjustment
(e.g. |
... |
Other arguments passed on to |
method |
Smoothing method (function) to use, accepts either
For If you have fewer than 1,000 observations but want to use the same |
formula |
Formula to use in smoothing function, eg. |
lineend |
Line end style (round, butt, square). |
linejoin |
Line join style (round, mitre, bevel). |
linemitre |
Line mitre limit (number greater than 1). |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
geom , stat |
Use to override the default connection between
|
n |
number of grid points in each direction |
base |
the base transformation of the data, options include 'identity' (ie direct on the cartesian space), or 'ilr' which means to use the isometric log ratio transformation. |
Aesthetics
geom_InterpolateTern
understands the following aesthetics (required aesthetics are in bold):
x
y
alpha
colour
linetype
size
Author(s)
Nicholas Hamilton
Examples
data(Feldspar)
ggtern(Feldspar,aes(Ab,An,Or,value=T.C)) +
stat_interpolate_tern(geom="polygon",
formula=value~x+y,
method=lm,n=100,
breaks=seq(0,1000,by=100),
aes(fill=..level..),expand=1) +
geom_point()