how can I plot inset of a new plot in a few of my subplots (say ha(1) and ha(3))?
조회 수: 6 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!