필터 지우기
필터 지우기

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 CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by