plot-api / jetbrains.letsPlot.geom / geom_smooth

geom_smooth

class geom_smooth : SmoothAesthetics, SmoothStatParameters, LayerBase

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.

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".

Constructors

<init>

Add a smoothed conditional mean.

geom_smooth(data: Map<*, *>? = null, stat: StatOptions = Stat.smooth(), position: PosOptions = Pos.identity, showLegend: Boolean = true, sampling: SamplingOptions? = 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 = {})

Properties

alpha

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

val alpha: Number?

color

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

val color: Any?

deg

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

val deg: Int?

fill

val fill: Any?

level

level of confidence interval to use. Default - 0.95.

val level: Number?

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"

val linetype: Any?

maxN

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

val maxN: Int?

method

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

val method: String?

n

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

val n: Int?

se

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

val se: Boolean?

seed

random seed for LOESS sampling.

val seed: Long?

size

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

val size: Number?

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.

val span: Number?

x

x-axis value.

val x: Double?

y

predicted (smoothed) value.

val y: Double?

ymax

upper pointwise confidence interval around the mean.

val ymax: Double?

ymin

lower pointwise confidence interval around the mean.

val ymin: Double?

Functions

seal

fun seal(): Options

Extension Functions

toSpec

fun Layer.toSpec(): MutableMap<String, Any>