imagescで作成したカラーマップとquieverで作成した矢印を重ねて描画したいのですが、どのようにすればよいのでしょうか。
作りたい図のイメージを添付します。よろしくお願いいたします。

 채택된 답변

Atsushi Ueno
Atsushi Ueno 2021년 7월 1일

1 개 추천

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

持田
持田 2021년 7월 1일
ありがとうございます!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 カラーマップ에 대해 자세히 알아보기

태그

질문:

2021년 7월 1일

댓글:

2021년 7월 1일

Community Treasure Hunt

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

Start Hunting!