enh: Add offset to Area.stack for streamgraphs - #6961
Open
ghostiee-11 wants to merge 1 commit into
Open
Conversation
Area.stack could only produce a flat zero baseline, so there was no way to draw a streamgraph in HoloViews. Add an offset argument accepting 'zero', 'sym', 'wiggle' and 'weighted_wiggle', reusing the baseline vocabulary and formulas from matplotlib.stackplot. No backend changes are needed. All three AreaPlot implementations already fill between the two value dimensions without clamping at zero, so a shifted baseline renders correctly on bokeh, matplotlib and plotly.
ghostiee-11
marked this pull request as ready for review
July 21, 2026 11:00
Contributor
Author
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6961 +/- ##
=======================================
Coverage 89.34% 89.35%
=======================================
Files 344 344
Lines 74650 74696 +46
=======================================
+ Hits 66696 66742 +46
Misses 7954 7954 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.

Description
Adds
offsettoArea.stack, mirroringstackplot'sbaseline={'zero', 'sym', 'wiggle', 'weighted_wiggle'}.wigglegives a streamgraph.Before
After
AI Disclosure
Tool & Model: Claude Code + Opus 4.8
Usage: scaffolded the tests and the matplotlib comparison script
I have tested all AI-generated content in my PR.
I take responsibility for all AI-generated content in my PR.
Checklist