How to merge two .fig images using hold on command?
2 次查看(过去 30 天)
显示 更早的评论
Hi everyone! I need a help with the command hold on. In particular, I would like to plot both voronoi70.fig, voronoi80.fig and this line here:
plot3(new_xedges_of_connection,new_yedges_of_connection,new_zedges_of_connection,'b')
so I have done this code:
openfig('voronoi70.fig');
hold on
openfig('voronoi80.fig');
...
...
...
...
...
plot3(new_xedges_of_connection,new_yedges_of_connection,new_zedges_of_connection,'b')
hold off
But at the end I obtain a plot with only voronoi80 and with what is contained in the command plot3. How can I include also voronoi70? Thanks in advance
0 个评论
采纳的回答
Walter Roberson
2022-9-6
You cannot use hold on to merge figures.
fig70 = openfig('voronoi70.fig');
fig80 = openfig('voronoi80.fig');
mfig = copyobj(fig70, groot);
copyobj(get(fig80, 'children'), mfig);
ax = gca(mfig);
hold(ax, 'on');
title(ax, '70 + 80');
plot3(ax, new_xedges_of_connection,new_yedges_of_connection,new_zedges_of_connection,'b')
hold(ax, 'off')
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Voronoi Diagram 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!