Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
Loren99
Loren99 el 6 de Sept. de 2022
Editada: Loren99 el 8 de Sept. de 2022
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Sept. de 2022
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')

Más respuestas (0)

Categorías

Más información sobre Voronoi Diagram en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by