fix: Correct histogram2dcontour fill colors for negative bin values - #8088
Open
jamalkamaladdin wants to merge 2 commits into
Open
jamalkamaladdin wants to merge 2 commits into
jamalkamaladdin wants to merge 2 commits into
Conversation
histogram2dcontour does not coerce `contours.type`, so closeBoundaries matched neither switch case and left `prefixBoundary` unset. The empty bin ring around a histogram2dcontour reads as 0 at the edge, so every level below 0 needs the perimeter prefix. Without it, those fills covered only the region below the level, and the region between the level and the edge took the background color. Treat an unset `contours.type` as `levels`, the attribute default. Fixes plotly#8005
Contributor
|
Thanks for the PR! Before I review this PR, could you walk through your potential solution in the issue? |
Author
|
histogram2dcontour never coerces contours.type, so the closeBoundaries switch matches neither case and prefixBoundary stays unset. |
Contributor
|
Comment in #8005 please. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Translations:
No locale files changed.
Features, Bug fixes, and others:
Fixes #8005.
src/traces/contour/close_boundaries.js: an unset
contours.typegoes to thelevelscase.histogram2dcontour has no coerced
contours.type.On main, histogram2dcontour fill levels get no
prefixBoundary.test/jasmine/tests/contour_test.js: new histogram2dcontour case with
histfunc: 'avg'and negativezvalues.draftlogs: new fix entry.
Jasmine suites: contour, histogram2d, colorscale, contourcarpet.
Moved image baselines: none.
AI disclosure: AI coding agent wrote code, test and text. Author reviewed code before this PR.