contourfを用いた塗りつぶし等高線図の重ねがきについて
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
suga
am 31 Jul. 2018
Kommentiert: suga
am 7 Aug. 2018
contourfを用いたイメージング画像の重ねがきをしようと考えましたが、データごとにカラーマップを変更する方法がわかりません。
例えばx1,x2ともに8×8のイメージングデータであり、それぞれ赤、緑にしたいとき
map1=[1,0,0;0.9,0,0];map2=[0,1,0;0,0.9,0];
contourf(x1,'LineStyle','none');alpha(.001);colormap(map1);hold on
contourf(x2,'LineStyle','none');alpha(.001);colormap(map2);
これだとx2だけでなくx1も緑色になってしまいます。x1を赤、x2を緑に塗りわける方法はありますでしょうか。
2 Kommentare
Akzeptierte Antwort
Hirokazu Tanaka
am 2 Aug. 2018
MATLAB Answersの他のエントリーですが
や
の 7. Example 5: Overlay Multiple Axes with Differing Colormaps in a Single Figure の例が参考になるかもしれません。Axes(座標軸)オブジェクト上には 1 つのしか colormap を定義できないので、2つの Axesオブジェクトを重ねる方法がよいのではと思います。
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 等高線図 finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!