From e37fa2b90ff4ef3b9332be6d96f3756970820fe8 Mon Sep 17 00:00:00 2001 From: Gareth Williams Date: Fri, 5 Sep 2025 23:30:30 +0100 Subject: [PATCH 1/2] fix --- plotly/express/_core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/express/_core.py b/plotly/express/_core.py index d2dbc84c0e7..40d525dd406 100644 --- a/plotly/express/_core.py +++ b/plotly/express/_core.py @@ -2290,7 +2290,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 ): From d7973e61f206090873be949b09c6f3e83c77ceaf Mon Sep 17 00:00:00 2001 From: Emily KL <4672118+emilykl@users.noreply.github.com> Date: Tue, 15 Sep 2026 16:39:48 -0400 Subject: [PATCH 2/2] add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65abbd3d003..b897f4cb31a 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