MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   绘图叠加MATLAB (https://www.labfans.com/bbs/showthread.php?t=22912)

poster 2019-12-10 16:49

绘图叠加MATLAB
 
如何在MATLAB中获取一个绘图并将其放置在另一绘图的角落(或在任何地方)?

我的对数数据在图的右上角有很大的空白。在空白区域中,我想在该空白区域中覆盖一个较小的绘图,其中包含对数绘图的放大版本(有点像放大视图)。

在您告诉我无法完成之前,我想提一下我已经看到了它的作用。如果缺少我的描述,请告诉我,我会尽力向您描述。


回答:
一个例子:

x = 1:20; y = randn(size(x)); plot(x, y,'LineWidth',2) xlabel('x'), ylabel('y'), title('Plot Title') h = axes('Position', [.15 .65 .2 .2], 'Layer','top'); bar(x,y), title('Bar Title') axis(h, 'off', 'tight') [IMG]https://i.stack.imgur.com/l5xuk.png[/IMG]



[url=https://stackoverflow.com/questions/1744667]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 10:26

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.