Jittered Points
val random = kotlin.random.Random(42)
val dataset = dataFrameOf(
"type" to List(50) { "a" } + List(50) { "b" },
"value" to List(50) { kotlin.random.Random.nextDouble(0.1, 0.6) } +
List(50) { random.nextDouble(-0.5, 0.4) }
)
val type = column<String>("type")
val value = column<Double>("value")
dataset.plot {
points {
x(type)
y(value)
color(type)
position = Position.jitter()
}
}
val random = kotlin.random.Random(42)
val type = List(50) { "a" } + List(50) { "b" }
val value = List(50) { random.nextDouble(0.1, 0.6) } +
List(50) { random.nextDouble(-0.5, 0.4) }
plot {
points {
x(type)
y(value)
color(type)
position = Position.jitter()
}
}
Last modified: 06 December 2023