Skip to content

Sided twin violins render boxplot whiskers incorrectly #5323

@rabyj

Description

@rabyj

Plotly version: 6.3.0

Follow-up to #1634 (never resolved).

When using sided (split) violins with box=dict(visible=True), the boxplot whiskers are drawn at the inner edge of each half-box, rather than being centered as in a normal boxplot.

This makes the left and right whiskers appear extremely close together, which creates significant visual confusion.

Example from #1634 (Advanced Violin Plot example with box=dict(visible=True)):
Image

My reproduction:
Image

Normal (non-sided) violins for comparison:
Image

Plotly 6.1.2 (in my work):
Image

Possible cause:
The boxplots may be internally split in half to fit each half-violin, shifting the “center” used for whisker rendering to the midpoint between the halves.

Possible solutions:

  • Preferred: Render each half-boxplot with whiskers centered over its own half-violin.
  • Alternative: Allow configurable spacing between the halves to reduce whisker overlap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclebugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions