kandy 0.7.0 Help

Grouped ErrorBars

val dataset = dataFrameOf( "time" to (1..5).toList() + (1..5).toList(), "min" to listOf(2.0, 3.4, 3.5, 5.5, 2.5) + listOf(1.0, 2.0, 3.0, 4.0, 3.7), "max" to listOf(3.0, 5.2, 5.0, 5.8, 3.4) + listOf(5.0, 4.0, 3.5, 5.0, 4.2), "category" to List(5) { "a" } + List(5) { "b" } ) dataset.groupBy("category").plot { errorBars { x("time") { axis.breaks((1..5).toList(), format = "d") } yMin("min") yMax("max") borderLine.color("category") } }
val dataset = mapOf( "time" to (1..5).toList() + (1..5).toList(), "min" to listOf(2.0, 3.4, 3.5, 5.5, 2.5) + listOf(1.0, 2.0, 3.0, 4.0, 3.7), "max" to listOf(3.0, 5.2, 5.0, 5.8, 3.4) + listOf(5.0, 4.0, 3.5, 5.0, 4.2), "category" to List(5) { "a" } + List(5) { "b" } ) dataset.plot { groupBy("category") { errorBars { x("time") { axis.breaks((1..5).toList(), format = "d") } yMin("min") yMax("max") borderLine.color("category") } } }
Grouped ErrorBars
Last modified: 06 December 2023