how can I plot inset of a new plot in a few of my subplots (say ha(1) and ha(3))?

조회 수: 6 (최근 30일)
Anil
Anil 2025년 6월 10일
편집: Matt J 2025년 6월 10일
I am using subplot
[ha, pos]= tight_subplot(2,3,[.1 .08],[.16 .04],[.09 .025]);
I want to add inset in a few of the plots say ha(1) and ha(3). I know that I should use
axes.('Position',[.5 .5 .2 .2]); box on;
But how shall i connect that to the ha(1) and ha(3) i.e. to a specific plot inside subplot.Thanks.

답변 (1개)

Matt J
Matt J 2025년 6월 10일
편집: Matt J 2025년 6월 10일
I know that I should use axes('Position',[.5 .5 .2 .2]); box on;
No, you have to set the Position of the inset axes relative to the parent figure. You can't set it w.r.t. another axes. So, you would have to map ha(i) position coordinates into parent figure position coordinates.
This FEX submission claims to be able to do the work for you,
though I haven't used it myself.

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by