フィルターのクリア

Colorbar mapping colors incorrectly on complex subplot image

1 回表示 (過去 30 日間)
Matlab2010
Matlab2010 2012 年 7 月 25 日
I have code that says:
figure;
color hsv;
subplot(511);
hold all;
heatmaptext(data1, 'COLORBAR',false); %data is a 2D matrix
%and so on for the next 4 subplots...
%then
axes('Position', [0.05 0.05 0.9 0.9], 'Visible', 'off');
c = colorbar;
caxis([myMin, myMax]); %just the max and min of all the data used
where heatmaptext.m is the "pick of the week" submission on the file exchange.
Its a great image HOWEVER, when I look closely I see that the colors in the cells do not align to the colors shown on the color bar (at all). eg for a colorbar with range -1 -> +1, bright red according to the colorbar is +1, whereas my red cells might have values of 0.5 (i.e. the cells should be green).
Hence something has gone wrong with the mapping.
I am pretty sure the issue is not with the heatmaptext.m code but with my attempt to put one universal colorbar on a subplot image.
Any ideas? thanks

回答 (0 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by