Skip to content

Keep error bars aligned when color or symbol splits a trace - #2508

Open
kshptl wants to merge 1 commit into
plotly:masterfrom
kshptl:fix/pr-engine-1657-e0daa3bc5d43
Open

kshptl wants to merge 1 commit into
plotly:masterfrom
kshptl:fix/pr-engine-1657-e0daa3bc5d43

Conversation

@kshptl

@kshptl kshptl commented Dec 2, 2026

Copy link
Copy Markdown

When color or symbol splits a trace, points can get the wrong error bars. plotly_build() now tracks each point's original row as it filters, sorts, and splits the data. It uses those rows to line up array and arrayminus on both axes, even across line gaps. When it remaps a short array, it uses "NaN" for missing entries so Plotly.js leaves those errors missing.

Fixes #1657.

  • On the base, 20 assertions in the new regression file failed. All 45 passed with the patch. The patched focused suite passed 297 assertions, with six line.width warnings and six visual skips.
  • The independent probes passed 14 of 29 and 9 of 19 checks on the base. Both passed every check with the patch.
  • The offline suite with ggplot2 4.0.2 passed on both revisions, with 1,473 assertions on the base and 1,518 with the patch. With ggplot2 3.5.1, both revisions failed the same boxplot assertion at test-ggplot-boxplot.R:93.
  • R CMD build and R CMD check exited 0 on both revisions. Both checks reported the same two warnings and two notes.

The offline suite excluded icicle and plotly-partial-bundles because they download fixtures or assets. It stubbed the Chart Studio release lookup. Visual, platform-specific, account, and optional-package skips still applied. The package check omitted --as-cran and the PDF manual. The tests ran separately.

Signed-off-by: Kush Patel <56747429+kshptl@users.noreply.github.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grouping by color and/or symbol changes the order of error_y bars

1 participant