Setting the range of colormap
1 次查看(过去 30 天)
显示 更早的评论
I want to set the min and max range of colormap
I want to set the limits of colormap based on the mix and max of values stored in data
data = rand(10,10);
min = min(min(data))
max= max(max(data))
Any suggestions on how this can be done?
0 个评论
回答(1 个)
Bhaskar R
2020-1-20
caxis([min(data(:)), max(data(:))]);
See more details
3 个评论
Image Analyst
2020-1-20
That's because you clear your figure with clf right at the start of the loop! That clears everything including what you set up with caxis(). Don't call clf.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Color and Styling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!