Skip to content

Errorbars on scatter plots don't react to point selection #7305

Open

Description

@alexcjohnson

If you make a plot with errorbars, they aren't affected at all by selections. This both looks weird (like part of your point was left behind when it became deselected) and can cause usability problems, in that it's harder to distinguish selected and unselected points, particularly if the points themselves are small.

The simple solution here would be to include the errorbars in the group that responds to marker.opacity. That also seems the most correct, as you shouldn't see an errorbar through a partially transparent marker, and intuitively I'd expect errorbars to become transparent along with their associated markers. I think that would cover most use cases, though including some errorbar attributes like color and thickness in the selected and unselected styles would also be nice.

A tricky bit here is that normally errorbars are drawn behind lines but markers are in front of lines, so they can't just be combined with the markers. I suspect the right solution is to only put them behind the lines when there are no markers, but when there are markers bring them up to just behind and grouped with each marker.

Relatedly, no errorbar attributes other than array and arrayminus accept arrays. Enabling color in particular to be an array would be useful, and could mostly work around the main issue here in some cases, though I wouldn't call it a full solution.

https://codepen.io/alexcjohnson/pen/RNbGamp?editors=0010
Image

To be clear: I don't think we should select the errorbars themselves - just select the points and bring the errorbars along for the ride.

Interestingly, errorbars on bar charts already behave correctly:

Image

Activity

  1. added
    bug
    on Dec 11, 2024
  2. emilykl commented on Sep 1, 2026

    @emilykl
    Contributor

    Related issue in plotly.py (though not identical): plotly/plotly.py#4353

  3. added
    ready-for-pr
    on Nov 30, 2026
  4. Yash-Tamboli commented on Dec 3, 2026

    @Yash-Tamboli

    Hi! I'd like to investigate synchronizing scatter plot error bars with marker selection opacity, following the suggested rendering approach while preserving the existing line and marker stacking order. Is this issue still available for contribution?

  5. camdecoster commented on Dec 3, 2026

    @camdecoster
    Contributor

    There's already a PR open for this issue. How would your solution be different?

  6. Yash-Tamboli commented on Dec 4, 2026

    @Yash-Tamboli

    Thanks for pointing that out, @camdecoster! I wouldn't want to duplicate the work already being done in #8102. However, I'd be happy to assist with the existing PR if any additional implementation, testing, or refinements are needed.

    Alternatively, could you guide me toward another open issue in the repository where my contributions would be useful? I'm genuinely interested in contributing to Plotly.js and would appreciate any suggestions.

  7. camdecoster commented on Dec 4, 2026

    @camdecoster
    Contributor

    @Yash-Tamboli you can see what issues are ready to be worked on at this link. Find one without an assignee and you can start working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood-for-agentready-for-pr

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions