imagescの上にquiverを重ねるには

5 Ansichten (letzte 30 Tage)
持田
持田 am 1 Jul. 2021
Kommentiert: 持田 am 1 Jul. 2021
imagescで作成したカラーマップとquieverで作成した矢印を重ねて描画したいのですが、どのようにすればよいのでしょうか。
作りたい図のイメージを添付します。よろしくお願いいたします。

Akzeptierte Antwort

Atsushi Ueno
Atsushi Ueno am 1 Jul. 2021
hold onを実行すると既存のプロットが削除されなくなります。体裁を出来るだけ近付けましたが値は適当です。
mn = -10; mx = 10;
[X,Y] = meshgrid(mn:mx,mn:mx);
imagesc([mn mx],[mn mx],-0.93 - X.*Y.*0.0007);
hold on; % <-ここです
quiver(X,Y,X,Y);
colormap jet;
colorbar;
title('Quiver Plot');
  1 Kommentar
持田
持田 am 1 Jul. 2021
ありがとうございます!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu カラーマップ finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!