How can I add a diagonal gradient and corresponding colorbar to a plot?

3 ビュー (過去 30 日間)
Halle Berger
Halle Berger 2019 年 9 月 17 日
コメント済み: Halle Berger 2019 年 10 月 29 日
This is what I'd like to create with my own data, how can I add that gradient and colorbar to my plot

採用された回答

darova
darova 2019 年 9 月 23 日
An example:
[X,Y] = meshgrid(1:0.1:3);
Z = X+Y;
pcolor(X,Y,Z)
shading interp
colorbar('Location','NorthOutside')
You can also create your own colormap

その他の回答 (1 件)

Jalaj Gambhir
Jalaj Gambhir 2019 年 9 月 20 日
Hi, colormap's can be used to do so. Look at an example here.
  1 件のコメント
Halle Berger
Halle Berger 2019 年 9 月 23 日
That's what I was thinking but I'm not exactly sure how to

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

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by