Reverse the Colormap of Surf plot

114 ビュー (過去 30 日間)
Jake
Jake 2020 年 5 月 26 日
コメント済み: Jake 2020 年 5 月 26 日
Hello,
I'm constructing a surf plot using Location (logitude, latitude) and depth data. Following image is the 2D projection of my surf plot. Is there a way to reverse the colormap of my plot?
i.e. Highest values should be shown in Dark blue (instead of yellow) and lowest values should be shown in yellow (instead of blue).
Thanks in advance!

採用された回答

Tommy
Tommy 2020 年 5 月 26 日
Grab the colormap and flip it upside down:
f = figure;
surf(peaks(50))
colormap(f, flipud(colormap(f)))
colorbar
  1 件のコメント
Jake
Jake 2020 年 5 月 26 日
Just what I needed! Thanks, Tommy.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by