File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -2671,5 +2671,20 @@ function testHeatmapTitleAnnotation(tc)
26712671 actualStrings = cellfun(@(ann ) ann .text , p .layout .annotations );
26722672 tc .verifyNotEmpty(actualStrings(contains(actualStrings , titleString )));
26732673 end
2674+
2675+ function testHeatmapAxisLabels(tc )
2676+ fig = figure(" Visible" ," off" );
2677+ data = [1 2 ; 3 4 ];
2678+ xLabelText = " X Axis Label" ;
2679+ yLabelText = " Y Axis Label" ;
2680+ heatmap(data );
2681+ xlabel(xLabelText );
2682+ ylabel(yLabelText );
2683+
2684+ p = plotlyfig(fig ," visible" ," off" );
2685+
2686+ tc .verifyEqual(p .layout .xaxis1 .title .text , xLabelText );
2687+ tc .verifyEqual(p .layout .yaxis1 .title .text , yLabelText );
2688+ end
26742689 end
26752690end
Original file line number Diff line number Diff line change 2727 " tickvals" , string(axis_data.(axisName + " DisplayData" )), ...
2828 " autotick" , false , ...
2929 " tickson" , " boundaries" , ...
30- " title" , axis_data.(axisName + " Label" ), ...
30+ " title" , struct( ...
31+ " text" , string(axis_data.(axisName + " Label" )) ...
32+ ), ...
3133 " titlefont" , struct( ...
3234 " color" , " black" , ...
3335 " size" , axis_data .FontSize * 1.3 , ...
You can’t perform that action at this time.
0 commit comments