フィルターのクリア

Replication of a colorbar in MatLab

2 ビュー (過去 30 日間)
Richard Wood
Richard Wood 2023 年 12 月 8 日
回答済み: DGM 2023 年 12 月 8 日
Hello everyone
I am trying to impement this colorbar:
My attempt has been the following:
colorA=[192 148 92]./255;
colorB=[1 1 1];
colorC=[82 107 120]./255;
cmap3=vertcat(interp1([0 1],[colorA;colorB],linspace(0,1,numcolors/2),'linear'),interp1([0 1],[colorB;colorC],linspace(0,1,numcolors/2+1),'linear'));
cmap3(numcolors/2+1,:)=[];
cmap3=flip(cmap3,1);
clear colorA colorB color C numcolors
which I have done trying to pick the extremal colors at each side of the aforementioned colorbar. However, I obtain something like this:
without that nice blue color evolution on the right side of it. Any suggestions on how to get closer to the reference image?

採用された回答

DGM
DGM 2023 年 12 月 8 日
I just reconstructed it from the image. See the attached file.
Z = peaks(100);
imagesc(Z)
colorbar
colormap(orangeaqua(256))

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by