|
I am trying to plot the same data set as an image with two different
colormaps (the second is to show the result of a thresholding
function). my MAP variable in the code below is a 2 D matrix showing
confidence/probability (so from 0-1).
ax= subplot(1,loopEnd-loopStart,fileIndex);
ibg1=imagesc(MAP);
%set(ibg1,'AlphaData',0.8);;
axis xy;
m=colormap(flipud(gray));
hold on;
ibg2=imagesc(MAP);
set(ibg2,'AlphaData',0.3);
axis xy;
% The following section is used to do threholding
thresholdValue = 0.45;
thresholdRow = round(thresholdValue * 256)
cmap = [ones(thresholdRow,3); ones((256-thresholdRow),3)*0.5]
colormap(cmap)
However, debugging at the point when I imagesc the second time, I
loose both figures, and it appears that the colormap is applied to
both images. What is the solution?
Note that when I try the matlab FAQ to superimpose two figure at
http://www.mathworks.com/support/solutions/en/data/1-1AK7N/index.html
applying colormap at the superposition point has no affect. I am not
clear about the internals of matlab but any help would be appreciated.
Affan
|