From fa516ea0451e31bb457f8b2c5ba5e480f3ce71be Mon Sep 17 00:00:00 2001 From: Lukas Date: Wed, 11 Feb 2026 22:55:23 +0100 Subject: [PATCH 1/3] Add {x,y}gap parameter to heatmaps --- plotly/src/traces/heat_map.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plotly/src/traces/heat_map.rs b/plotly/src/traces/heat_map.rs index cd108283..38fe48f9 100644 --- a/plotly/src/traces/heat_map.rs +++ b/plotly/src/traces/heat_map.rs @@ -7,7 +7,7 @@ use crate::{ common::{ Calendar, ColorBar, ColorScale, Dim, HoverInfo, Label, LegendGroupTitle, PlotType, Visible, }, - private::NumOrStringCollection, + private::{NumOrString, NumOrStringCollection}, Trace, }; @@ -107,11 +107,15 @@ where x_axis: Option, #[serde(rename = "xcalendar")] x_calendar: Option, + #[serde(rename = "xgap")] + x_gap: Option, y: Option>, #[serde(rename = "yaxis")] y_axis: Option, #[serde(rename = "ycalendar")] y_calendar: Option, + #[serde(rename = "ygap")] + y_gap: Option, z: Option>, zauto: Option, #[serde(rename = "zhoverformat")] From a6ffbc4ce340105802fb560323d93760be0483c6 Mon Sep 17 00:00:00 2001 From: Lukas Date: Wed, 11 Feb 2026 23:21:12 +0100 Subject: [PATCH 2/3] add new parameters to the test --- plotly/src/traces/heat_map.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plotly/src/traces/heat_map.rs b/plotly/src/traces/heat_map.rs index 38fe48f9..2aed5847 100644 --- a/plotly/src/traces/heat_map.rs +++ b/plotly/src/traces/heat_map.rs @@ -227,8 +227,10 @@ mod tests { .visible(Visible::LegendOnly) .x_axis("x") .x_calendar(Calendar::Hebrew) + .x_gap(1.0) .y_axis("y") .y_calendar(Calendar::Islamic) + .y_gap("10") .zauto(true) .zhover_format("fmt") .zmax(10.0) From 8e78a0a9979529565e667c1165e271c4eee2d574 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 12 Feb 2026 19:06:54 +0100 Subject: [PATCH 3/3] fixup tests due to the new params --- plotly/src/traces/heat_map.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plotly/src/traces/heat_map.rs b/plotly/src/traces/heat_map.rs index 2aed5847..4f3e45d7 100644 --- a/plotly/src/traces/heat_map.rs +++ b/plotly/src/traces/heat_map.rs @@ -262,9 +262,11 @@ mod tests { "x": [0.0, 1.0], "xcalendar": "hebrew", "xaxis": "x", + "xgap": 1.0, "y": [2.0, 3.0], "yaxis": "y", "ycalendar": "islamic", + "ygap": "10", "z": [[4.0, 5.0], [6.0, 7.0]], "zauto": true, "zhoverformat": "fmt",