how to set specific limits for a colorbar
39 次查看(过去 30 天)
显示 更早的评论
Hi : I wanted to write a small code to generate a colorbar with limits from -180 to 180. any help please?
0 个评论
回答(1 个)
Meghana Dinesh
2014-11-25
Use caxis([min, max]). By default is considers the min and max values of you data plot.
subplot(2,1,1) % default case
surf(peaks(50))
colorbar
subplot(2,1,2)
surf(peaks(50))
caxis([-10, 10]) % the required limits set
colorbar
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colorbar 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!