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

9 visualizaciones (últimos 30 días)
Anil
Anil el 10 de Jun. de 2025
Editada: Matt J el 10 de Jun. de 2025
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.

Respuestas (1)

Matt J
Matt J el 10 de Jun. de 2025
Editada: Matt J el 10 de Jun. de 2025
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.

Etiquetas

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by