Learn R Programming

ggtern (version 1.0.5.0)

stat_smooth: Add a smoother. (Ternary Version)

Description

Aids the eye in seeing patterns in the presence of overplotting

Usage

stat_smooth(mapping = NULL, data = NULL, geom = "smoothtern",
  position = "identity", method = "auto", formula = y ~ x, se = TRUE,
  n = 80, fullrange = FALSE, level = 0.95, na.rm = FALSE, ...)

Arguments

mapping
The aesthetic mapping, usually constructed with aes or aes_string. Only needs to be set at the layer level if you are overriding the plot defaults.
data
A layer specific dataset - only needed if you want to override the plot defaults.
geom
The geometric object to use display the data
position
The position adjustment to use for overlappling points on this layer
method
smoothing method (function) to use, eg. lm, glm, gam, loess, rlm. For datasets with n < 1000 default is loess. For datasets with 1000 or more observations defaults to gam, see
formula
formula to use in smoothing function, eg. y ~ x, y ~ poly(x, 2), y ~ log(x)
se
display confidence interval around smooth? (TRUE by default, see level to control
n
number of points to evaluate smoother at
fullrange
should the fit span the full range of the plot, or just the data
level
level of confidence interval to use (0.95 by default)
na.rm
If FALSE (the default), removes missing values with a warning. If TRUE silently removes missing values.
...
other arguments are passed to smoothing function

See Also

stat_smooth