@@ -1131,7 +1131,7 @@ function testStackedBarData(tc)
11311131 end
11321132
11331133 function testHeatmapData(tc )
1134- fig = figure(" Visible" , " off" );
1134+ fig = figure(Visible = " off" );
11351135 data = magic(5 );
11361136 heatmap(data );
11371137
@@ -1154,17 +1154,23 @@ function testHeatmapData(tc)
11541154 ), ...
11551155 showscale = true , ...
11561156 colorbar = struct( ...
1157- x = 0.87 , ...
1158- y = 0.52 , ...
1159- ypad = 55 , ...
1160- xpad = 0 , ...
1157+ x = fig .Children .Position(1 ) + fig .Children .Position(3 ), ...
1158+ y = fig .Children .Position(2 ), ...
1159+ xanchor = " left" , ...
1160+ yanchor = " bottom" , ...
1161+ thicknessmode = " fraction" , ...
1162+ thickness = fig .Children .Position(3 )/10 , ...
1163+ lenmode = " fraction" , ...
1164+ len = fig .Children .Position(4 ), ...
1165+ ypad = 0 , ...
1166+ xpad = 10 , ...
11611167 outlinecolor = " rgb(150,150,150)" ...
11621168 ), ...
11631169 visible = true , ...
11641170 opacity = 0.9500 , ...
11651171 showlegend = false , ...
11661172 name = " " ...
1167- ));
1173+ ), AbsTol = 1e - 15 );
11681174 end
11691175
11701176 function testErrorbarData(tc )
@@ -2457,7 +2463,7 @@ function testTiledLayoutHeatmap(tc)
24572463 p = plotlyfig(fig ," visible" ," off" );
24582464
24592465 tc .verifyNumElements(p .data , 4 );
2460- tc .verifyEqual(rmfield(p.data{1 }, " colorscale" ), struct( ...
2466+ tc .verifyEqual(rmfield(p.data{1 }, [ " colorscale" " colorbar " ] ), struct( ...
24612467 xaxis = " x1" , ...
24622468 yaxis = " y1" , ...
24632469 type = " heatmap" , ...
@@ -2472,18 +2478,22 @@ function testTiledLayoutHeatmap(tc)
24722478 bgcolor = " white" ...
24732479 ), ...
24742480 showscale = true , ...
2475- colorbar = struct( ...
2476- x = 0.87 , ...
2477- y = 0.52 , ...
2478- ypad = 55 , ...
2479- xpad = 0 , ...
2480- outlinecolor = " rgb(150,150,150)" ...
2481- ), ...
24822481 visible = true , ...
24832482 opacity = 0.9500 , ...
24842483 showlegend = false , ...
24852484 name = " " ...
2486- ));
2485+ ), AbsTol= 1e- 15 );
2486+ tc .verifyEqual(rmfield(p.data{1 }.colorbar, [" thickness" " x" ]), struct( ...
2487+ y = fig .Children .Children(4 ).Position(2 ), ...
2488+ xanchor = " left" , ...
2489+ yanchor = " bottom" , ...
2490+ thicknessmode = " fraction" , ...
2491+ lenmode = " fraction" , ...
2492+ len = fig .Children .Children(4 ).Position(4 ), ...
2493+ ypad = 0 , ...
2494+ xpad = 10 , ...
2495+ outlinecolor = " rgb(150,150,150)" ...
2496+ ), AbsTol= 1e- 15 );
24872497 end
24882498
24892499 function testGroupedBarPlotData(tc )
0 commit comments