Reverse the Colormap of Surf plot

조회 수: 92 (최근 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 CenterFile Exchange에서 Blue에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by