I am getting a colorbar with uniform color. I want there to be variations so the distribution makes sense.
4 次查看(过去 30 天)
显示 更早的评论
The P matrix varies from 1 to 2, however the returned figure shows one square with one uniform color. it would be a great help, if i could have a range of colors in that range(1 to 2) to show the distribution.
imshow(P,'InitialMagnification',2000)
colb = colorbar;
set(colb, 'ylim', [1 2])
采纳的回答
Walter Roberson
2017-11-26
imshow(P, [], 'InitialMagnification',2000)
4 个评论
Walter Roberson
2017-11-26
colormap(jet) after the imshow() call.
Or... you could instead
imagesc(P);
colormap(jet);
This will not mess up nearly as many settings as imshow() will.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!