Skip to content

[BUG] Boxplot outliers not aligned with boxes #511

Description

@JFronny

Describe the bug

When creating a boxplot with categories (based on this example) where no outliers exist for one category, the outliers for other categories are positioned as though that category didn't exist.

To Reproduce

Steps to reproduce the behavior:

  1. Download the aforementioned example
  2. Replace generateData with
    fun generateData(category: String) =
        dataFrameOf((0..<5).map { it.toString() }) { k -> List(100) { if (category != "category0" && it < 10) random.nextDouble(45.0, 55.0) else 50.0 } }
            .gather(*(0..<5).map { it.toString() }.toTypedArray())
            .into("num", "value").add("category") { category }
  1. Include outliers in the boxplot
  2. Render or display the plot
  3. See that it is wrong, even after trying to mess with position

Expected behavior

The outlier dots should always be in the same column as the corresponding box

Actual Behavior

The outlier dots are positioned as though there are only two columns, which causes them to end up in the wrong columns

Screenshots

Image

Library Version, Tool version, and Environment

(please complete the following information):

  • Library version: 0.8.3
  • Kotlin-Notebook version: none, added via Gradle

Additional information

I have uploaded the modified example code as a gist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions