필터 지우기
필터 지우기

How to merge two .fig images using hold on command?

조회 수: 2 (최근 30일)
Loren99
Loren99 2022년 9월 6일
편집: Loren99 2022년 9월 8일
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

채택된 답변

Walter Roberson
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개)

카테고리

Help CenterFile Exchange에서 Voronoi Diagram에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by