Add a Smoothed Conditional Mean.
Aids the eye in seeing patterns in the presence of overplotting.
geom_smooth_tern
and stat_smooth_tern
are effectively aliases: they
both use the same arguments. Use geom_smooth_tern
unless you want to
display the results with a non-standard geom.
geom_smooth_tern(mapping = NULL, data = NULL, position = "identity", ..., method = "auto", formula = y ~ x, se = TRUE, na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, expand = c(0.5, 0.5)) stat_smooth_tern(mapping = NULL, data = NULL, position = "identity", ..., method = "auto", formula = y ~ x, se = TRUE, n = 80, span = 0.75, fullrange = FALSE, level = 0.95, method.args = list(), na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, expand = c(0.5, 0.5))
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, or the result of a call to a position adjustment function. |
... |
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. |
se |
Display confidence interval around smooth? ( |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
expand |
expand the range of values by this much (vector of length 2) when fullrange is set to TRUE |
n |
Number of points at which to evaluate smoother. |
span |
Controls the amount of smoothing for the default loess smoother. Smaller numbers produce wigglier lines, larger numbers produce smoother lines. |
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). |
method.args |
List of additional arguments passed on to the modelling
function defined by |
Nicholas Hamilton
data(Feldspar) ggtern(data=Feldspar,aes(Ab,An,Or,group=Feldspar)) + geom_smooth_tern(method=lm,fullrange=TRUE,colour='red') + geom_point() + labs(title="Example Smoothing")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.