Matlab:在图像中嵌入图

时间:2013-11-25 01:13:01

标签: matlab matlab-figure

我希望在Matlab中显示图像,然后在左下角嵌入(叠加)与图像相关的图。将图像保存到文件时,我希望嵌入的图存在。

我该怎么做?

1 个答案:

答案 0 :(得分:0)

我认为这段代码可以做你想要的:

load gatlin
image(X)
colormap(map)
set(gca,'visible', 'off') % turn axis ticks off for the image
image_axes_pos = get(gca,'position');
plot_axes_pos = image_axes_pos;
plot_axes_pos(3:4) = plot_axes_pos(3:4)/2;
plot_axes_hnd = axes('position', plot_axes_pos);
plot(plot_axes_hnd, sin(1:.1:10))
print('-dmeta', 'myfile') % save to a metafile, best for importing into Word, PowerPonint, etc.