From 4cedb3035c5456ac3256acfcdf6b8307650cbd44 Mon Sep 17 00:00:00 2001 From: Roberto Moura Date: Sat, 21 Nov 2026 06:08:24 +0000 Subject: [PATCH] Test_plotlyfig: allow sub-pixel tile position drift in testTiledLayoutHeatmap --- plotly/Test_plotlyfig.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plotly/Test_plotlyfig.m b/plotly/Test_plotlyfig.m index 9d9fb183..c8c550e9 100644 --- a/plotly/Test_plotlyfig.m +++ b/plotly/Test_plotlyfig.m @@ -2688,6 +2688,9 @@ function testTiledLayoutHeatmap(tc) "showlegend", false, ... "name", "" ... ), 'AbsTol', 1e-15); + % the tile's Position can differ by ~1e-8 between the + % converter's read and this one (seen on headless MATLAB), + % far below a pixel tc.verifyEqual(rmfield(p.data{1}.colorbar, ["thickness" "x"]), struct( ... "y", fig.Children.Children(4).Position(2), ... "xanchor", "left", ... @@ -2698,7 +2701,7 @@ function testTiledLayoutHeatmap(tc) "ypad", 0, ... "xpad", 10, ... "outlinecolor", "rgb(150,150,150)" ... - ), 'AbsTol', 1e-15); + ), 'AbsTol', 1e-6); try close(); catch; end end