1つの図の中に2つの​カラーバー(カラーマ​ップ)を存在させる方​法

15 vues (au cours des 30 derniers jours)
Yuto Kobayahi
Yuto Kobayahi le 10 Oct 2018
Commenté : Yuto Kobayahi le 11 Oct 2018
現在,2つのデータに対して1つの図の中にsurfを用いてカラーマップを書いています.
しかしながら,colormap等で色の指定をしても2つのデータ両方が同じ色のグラデーションで表示されています.
例えば1つ目はwinterでカラーマップを書き,2つ目はautumnでカラーマップを書いたのを
同じfigure内で存在させたいです.
x=[0:0.1:20];y=[0:0.001:5];
[X,Y]=meshgrid(x,y);
Z1 = 2* exp(1/1.5 *(Y-4));
Z2 = 2* exp(-1/1.5 *(Y-1));
figure
surf(X,Y,Z1,'EdgeColor','none');colormap('autumn');
hold on
surf(X,Y,Z2,'EdgeColor','none');colormap('winter');
これが今書いているmファイルです.

Réponses (2)

Yoshio
Yoshio le 10 Oct 2018
  1 commentaire
Yuto Kobayahi
Yuto Kobayahi le 11 Oct 2018
回答ありがとうございます。
3次元でのグラフを書きたいため,こちらではできなかったです. お手数おかけして申し訳ありません. ありがとうございます.

Connectez-vous pour commenter.


Hirokazu Tanaka
Hirokazu Tanaka le 10 Oct 2018
Modifié(e) : Hirokazu Tanaka le 10 Oct 2018
参考まで、英語ですが類似の質問が見つかったので紹介します。

Catégories

En savoir plus sur カラーマップ dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!