绘图叠加MATLAB [英] Plot Overlay MATLAB
问题描述
您如何在MATLAB中获取一个绘图并将其放置在另一绘图的角落(或在任何地方)?
How do you take one plot and place it in the corner (or anywhere for that matter) of another plot in MATLAB?
我的对数数据在图的右上角有很大的空白.在空白区域中,我想在该空白区域中覆盖一个较小的绘图,其中包含对数绘图的放大版本(有点像放大视图).
I have logarithmic data that has a large white space in the upper right-hand side of the plot. In the white space I would like to overlay a smaller plot containing a zoomed in version of the log plot in that white space (sort of like a magnified view).
在您告诉我它无法完成之前,我想提及一下我已经看到了它的实际效果.如果缺少我的描述,请告诉我,我会尽力向你描述.
Before you tell me it can't be done, I would like to mention that I have seen it in action. If my description is lacking, just let me know and I'll attempt to better describe it to you.
推荐答案
示例:
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')
这篇关于绘图叠加MATLAB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!