You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With marginal_x="heatmap" / marginal_y="heatmap" (added in #5707), the marginal strips copy histfunc from the main heatmap but not histnorm. All three traces share coloraxis, and the hover label even says percent, but the marginal strips still use raw counts. The shared colour scale therefore mixes percentages and counts.
This is the histnorm counterpart of #5704, which covered marginal histograms ignoring z/histfunc.
Screenshots/Video
Not applicable. The mismatch is in the trace histnorm values (and therefore the shared colour scale), which the steps below print directly.
Steps to reproduce
Reproduced on current main (2b5fddb50), which is ahead of the latest PyPI release.
Expected: ['percent', 'percent', 'percent']. The same gap appears with histnorm="probability" and the other histnorm values.
Notes
heatmap_trace_patch in plotly/express/_core.py sets histfunc=args.get("histfunc") but does not set histnorm. Adding histnorm=args.get("histnorm") next to it fixes it. I can open a PR with a regression test in tests/test_optional/test_px/test_marginals.py.
Activity