kandy
 
0.8.0-RC1
Because kandy 0.8.0-RC1 is still in development, this documentation may not be entirely accurate and is subject to change.

Points with ABLine

Edit pageLast modified: 22 November 2023
val xValues by columnOf(
    7.13, 9.30, 7.84, 7.08, 5.51,
    8.40, 5.69, 11.59, 12.53, 4.98,
    10.29, 6.88, 7.38, 12.03, 0.92
)
val yValues by columnOf(
    7.05, 8.23, 6.74, 7.95, 5.38,
    7.47, 4.88, 9.17, 9.30, 6.17,
    6.58, 5.87, 6.45, 10.53, 3.13
)

plot {
    points {
        x(xValues)
        y(yValues)
        size = 7.0
        color = Color.LIGHT_BLUE
    }
    abLine {
        slope.constant(0.5)
        intercept.constant(3)
        color = Color.RED
    }
}
Points with ABLine