image - Does imshow have side effects in Matlab? And how can I resolve them? -
i have 2 axes let's a1 , a2, , on a2 have image displays imshow, on a1 display entirely different imagesc, , produces different result color-wise when a2 used. here example code, shortest example:
a = zeros(1);  [b,bmap] = imread('f.bmp'); c = figure(); d = axes('parent',c,'position',[0,0,.5,1]); e = axes('parent',c,'position',[.5,0,.5,1]);   axes(d); imagesc(a); pause(); axes(e); imshow(b,bmap); pause(); cla(d); axes(d); imagesc(a); figure(); axes(); imagesc(a);   the image displays differently after b shown, when displayed in different figure displays normally. how can fix this?
after digging in think because providing map, bmap imshow causes figure.colormap value change, can fixed typing colormap default after imshow command.
Comments
Post a Comment