Smoothed Curve with Points
val xs = listOf(-3.0, -2.5, -2.0, -1.5, -1.0, 0.0, 1.0, 1.5, 2.0, 2.5, 3.0)
val ys = listOf(-5.4, -1.2, 3.4, 0.1, -0.6, -2.1, 0.6, 2.2, 3.4, 4.5, 6.7)
plot {
smoothLine(xs, ys, method = SmoothMethod.LOESS(span = 0.3)) {
color = Color.GREEN
}
points {
size = 4.0
color = Color.ORANGE
x(xs)
y(ys)
}
}
Last modified: 22 November 2023