【发布时间】:2018-01-18 07:29:00
【问题描述】:
在下面的代码中,我尝试用红色突出显示特定列。但是,生成的标签颜色条未与标签对齐,如图所示。我该如何纠正这个问题?
datdat = randn(5,10);
regregnames = {'A', 'B', 'C', 'D', 'E'};
colors = cell(1,size(datdat,2));
for i=1:size(datdat,2)
colors{i} = [1,1,1];
end
colors{3} = [1,0,0];
s.Labels = arrayfun(@num2str, 1:size(datdat,2), 'UniformOutput', false);
s.Colors = colors;
clscls = clustergram(datdat, 'RowLabels', regregnames, 'ColumnLabels', s.Labels, 'ColumnLabelsColor', s, 'LabelsWithMarkers', true);
【问题讨论】:
标签: matlab alignment customization matlab-figure heatmap