-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Milestone
Description
Ordered data frame gets re-ordered by geomBoxplot() without any control over that.
Example:
import kotlin.random.*
import java.time.*
val rand = Random(0L)
val df = dataFrameOf(
"date" to (0 until 100).map { LocalDate.of(2020, 1, 1).plusDays((it % 10).toLong()).toString() },
"count" to (0 until 100).map { rand.nextInt(0, 100) }
)
println(df.sortBy("date").toMap())
letsPlot(df.sortBy("date").toMap()) +
geomBoxplot() { x = "date"; y = "count" }
{date=[2020-01-01, 2020-01-01, 2020-01-01, 2020-01-01, 2020-01-01, 2020-01-01, 2020-01-01, 2020-01-01, 2020-01-01, 2020-01-01, 2020-01-02, 2020-01-02, 2020-01-02, 2020-01-02, 2020-01-02, 2020-01-02, 2020-01-02, 2020-01-02, 2020-01-02, 2020-01-02, 2020-01-03, 2020-01-03, 2020-01-03, 2020-01-03, 2020-01-03, 2020-01-03, 2020-01-03, 2020-01-03, 2020-01-03, 2020-01-03, 2020-01-04, 2020-01-04, 2020-01-04, 2020-01-04, 2020-01-04, 2020-01-04, 2020-01-04, 2020-01-04, 2020-01-04, 2020-01-04, 2020-01-05, 2020-01-05, 2020-01-05, 2020-01-05, 2020-01-05, 2020-01-05, 2020-01-05, 2020-01-05, 2020-01-05, 2020-01-05, 2020-01-06, 2020-01-06, 2020-01-06, 2020-01-06, 2020-01-06, 2020-01-06, 2020-01-06, 2020-01-06, 2020-01-06, 2020-01-06, 2020-01-07, 2020-01-07, 2020-01-07, 2020-01-07, 2020-01-07, 2020-01-07, 2020-01-07, 2020-01-07, 2020-01-07, 2020-01-07, 2020-01-08, 2020-01-08, 2020-01-08, 2020-01-08, 2020-01-08, 2020-01-08, 2020-01-08, 2020-01-08, 2020-01-08, 2020-01-08, 2020-01-09, 2020-01-09, 2020-01-09, 2020-01-09, 2020-01-09, 2020-01-09, 2020-01-09, 2020-01-09, 2020-01-09, 2020-01-09, 2020-01-10, 2020-01-10, 2020-01-10, 2020-01-10, 2020-01-10, 2020-01-10, 2020-01-10, 2020-01-10, 2020-01-10, 2020-01-10], count=[14, 88, 39, 44, 9, 64, 43, 82, 34, 24, 48, 64, 79, 24, 60, 2, 58, 43, 88, 58, 57, 8, 18, 46, 37, 11, 20, 47, 11, 40, 67, 62, 84, 59, 41, 13, 69, 11, 4, 90, 82, 63, 26, 12, 7, 3, 49, 64, 82, 64, 7, 68, 63, 70, 66, 61, 70, 57, 0, 86, 61, 74, 51, 57, 49, 74, 9, 48, 41, 42, 27, 83, 72, 75, 11, 46, 97, 81, 49, 42, 14, 45, 27, 95, 89, 83, 94, 46, 0, 18, 59, 56, 25, 57, 71, 41, 60, 42, 18, 32]}