Plot inside a plot with automatic adjustment

4 visualizzazioni (ultimi 30 giorni)
Ricardo MF
Ricardo MF il 13 Giu 2018
I am using a plot inside a plot based on kindly instructions from this community. My problem, however, is that the internal box should always be at the corner of the curve of the external box; the internal box size (height and width) should always adjust itself to touch to the line described by the function of the external box. At the figure attached this was done manually. Looking forward to hearing from you. Thanks a lot.
a=1;ro=0.5;pref1=5;pref2=5;z=10:87:10401 ; x2=a*((z.^(1./ro)).*(1./(z.^pref2))).^(1./pref1); y2 = y;%sin(2*pi*x2); x1 = linspace(0,pi/2); y1 = 2*cos(x1/3.3); figure(1) plot(x1,y1) axes('Position',[.13 .11 .5 .5]) box on plot(x2,y2)

Risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by