plot-api / jetbrains.letsPlot.geom / geom_smooth / <init>

<init>

geom_smooth(data: Map<*, *>? = null, stat: StatOptions = Stat.smooth(), position: PosOptions = Pos.identity, showLegend: Boolean = true, sampling: SamplingOptions? = null, tooltips: TooltipOptions? = null, x: Double? = null, y: Double? = null, ymin: Double? = null, ymax: Double? = null, size: Number? = null, linetype: Any? = null, color: Any? = null, fill: Any? = null, alpha: Number? = null, method: String? = null, n: Int? = null, level: Number? = null, se: Boolean? = null, span: Number? = null, deg: Int? = null, seed: Long? = null, maxN: Int? = null, mapping: SmoothMapping.() -> Unit = {})

Add a smoothed conditional mean.

Parameters

data - dictionary, optional. The data to be displayed in this layer. If None, the default, the data is inherited from the plot data as specified in the call to lets_plot.

stat - string, optional. The statistical transformation to use on the data for this layer.

position - string, optional. Position adjustment, either as a string ("identity", "stack", "dodge", ...), or the result of a call to a position adjustment function.

tooltips - result of the call to the layer_tooltips() function. Specifies appearance, style and content.

x - x-axis value.

y - predicted (smoothed) value.

ymin - lower pointwise confidence interval around the mean.

ymax - upper pointwise confidence interval around the mean.

alpha - transparency level of a layer. Understands numbers between 0 and 1.

color - (colour) color of a geometry. Can be continuous or discrete. For continuous value this will be a color gradient between two colors.

size - lines width. Defines line width for conditional mean and confidence bounds lines.

linetype - type of the line of tile's border Codes and names: 0 = "blank", 1 = "solid", 2 = "dashed", 3 = "dotted", 4 = "dotdash", 5 = "longdash", 6 = "twodash"

method - smoothing method: lm (Linear Model) or loess (Locally Estimated Scatterplot Smoothing). Default is 'lm'.

n - number of points to evaluate smoother at. Default is 80.

se - boolean, to display confidence interval around smooth. Default - true.

level - level of confidence interval to use. Default - 0.95.

span - number, optional. Default - 0.5. Only for LOESS method. The fraction of source points closest to the current point is taken into account for computing a least-squares regression. A sensible value is usually 0.25 to 0.5.

deg - degree of polynomial for linear regression model. Default - 1.

seed - random seed for LOESS sampling.

maxN - maximum number of data-points for LOESS method. Default - 1000. If this quantity exceeded random sampling is applied to data.

mapping - set of aesthetic mappings. Aesthetic mappings describe the way that variables in the data are mapped to plot "aesthetics".