colorbarの変更に関して
显示 更早的评论
NDVIでよく見かけるこのような図を作りたいのですが、colorbarの設定にこのような配色はないのですが、どうすればいいですか。

采纳的回答
更多回答(1 个)
Kojiro Saito
2022-1-21
ただ、RGBを設定して独自のカラーマップを作ることができます。例えば赤色→黄色→緑色を256刻みで表すようなカラーマップを作るにはこんな感じです。
redColor = (255:-1:0)' / 255;
blueColor = zeros(1, 256)' / 255;
greenColor = (0:255)' / 255;
colormap([redColor greenColor blueColor])
类别
在 帮助中心 和 File Exchange 中查找有关 Colorbar 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
