|
"nanren888 " <nanren888.remove.this@hotmail.com> wrote in message <hvcpcm$7db$1@fred.mathworks.com>...
> I was trying larger colormaps.
>
> len = 64;
> im = [0:(len-1);(len-1):-1:0]; % ramp up & ramp down
> figure(1);
> image(im);
> cm = hsv(len);
> colormap(cm);
> colorbar();
> figure(2); plot(cm); colormap(cm);
>
> Pretty much as I expect. A couple of ramps with a colorbar. figure(2) shows the correct colormap.
>
> len = 164;im = [0:(len-1);(len-1):-1:0];figure(1);image(im);cm = hsv(len);colormap(cm);colorbar();figure(2);plot(cm);colormap(cm);
>
> Same
>
> len = 264;im = [0:(len-1);(len-1):-1:0];figure(1);image(im);cm = hsv(len);colormap(cm);colorbar();figure(2);plot(cm);colormap(cm);
>
> Now a black bar appears at the top.
>
> len = 1264; ...
>
> The whole graph goes black.
> figure(2) still shows correct colormap values, but not the image nor the colorbar.
>
> Mapping is default 'direct'. Image content is double.
>
> Seems that something about 'direct' access of colormaps in images wraps at 255.
> Anyone explain it to me?
> Thanks, in advance.
the problem is hw related...
one of the solutions
figure;
colormap(hsv(1024));
colorbar;
disp('all red - cont with any key');
pause;
set(gcf,'renderer','opengl');
% full cmap...
us
|