Colorbar mapping colors incorrectly on complex subplot image

2 vues (au cours des 30 derniers jours)
Matlab2010 le 25 Juil 2012
I have code that says:
color hsv;
hold all;
heatmaptext(data1, 'COLORBAR',false); %data is a 2D matrix
%and so on for the next 4 subplots...
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

Réponses (0)


En savoir plus sur White dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by