Plot inside a plot with automatic adjustment
2 次查看(过去 30 天)
显示 更早的评论
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)
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!