diff --git a/CHANGELOG.md b/CHANGELOG.md index 65abbd3d00..b897f4cb31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +### Fixed +- Fix default `histfunc` value for `px.Histogram2dContour` when no arguments are provided; it now correctly defaults to `'sum'`, matching the behavior of `px.Histogram2d()` [[#5342](https://github.com/plotly/plotly.py/pull/5342)], with thanks to @gmjw for the contribution! ## [7.1.0] - 2026-09-15 diff --git a/plotly/express/_core.py b/plotly/express/_core.py index 027df9e5aa..8b154672b7 100644 --- a/plotly/express/_core.py +++ b/plotly/express/_core.py @@ -2332,7 +2332,7 @@ def infer_config(args, constructor, trace_patch, layout_patch): layout_patch[mode] = "group" if ( - constructor == go.Histogram2d + constructor in [go.Histogram2d, go.Histogram2dContour] and args["z"] is not None and args["histfunc"] is None ):