Apply histfunc/z aggregation to marginal histograms in density_heatmap/density_contour - #5705
Open
lucasjamar wants to merge 1 commit into
Open
Apply histfunc/z aggregation to marginal histograms in density_heatmap/density_contour#5705lucasjamar wants to merge 1 commit into
lucasjamar wants to merge 1 commit into
Conversation
…p/density_contour Marginal histogram subplots always showed raw bin counts, ignoring the z value and histfunc the user passed to the main plot. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
marginal_x/marginal_y="histogram") indensity_heatmap/density_contouralways showed raw bin counts, ignoring thezvalue andhistfuncpassed to the main plot.histfunconto the marginalgo.Histogramtrace, feedingzonto the axis opposite the shared coordinate, so the marginal now aggregates consistently with the main plot.zis not passed.Fixes #5704
Related to #3521
Test plan
test_marginal_histogram_uses_z_and_histfunc/test_marginal_histogram_without_z_is_unchangedintests/test_optional/test_px/test_marginals.pypytest tests/test_optional/test_px/test_marginals.py— 145 passedpytest tests/test_optional/test_px/— 1135 passed, 3 skipped, 4 xfailed (47 pre-existing failures intest_trendline.pyunrelated to this change — localstatsmodels/scipyversion conflict)ruff checkclean on changed files (pinnedruff==0.11.12)