フィルターのクリア

how to set specific limits for a colorbar

51 ビュー (過去 30 日間)
Naema
Naema 2014 年 11 月 25 日
回答済み: Meghana Dinesh 2014 年 11 月 25 日
Hi : I wanted to write a small code to generate a colorbar with limits from -180 to 180. any help please?

回答 (1 件)

Meghana Dinesh
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

カテゴリ

Help Center および File ExchangeColorbar についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by