clear the ploted nodes only

1 visualización (últimos 30 días)
singh
singh el 22 de Abr. de 2015
Editada: singh el 25 de Abr. de 2015
clear all
N=20;
area=100;
hold on;
for i=1:N
hplot(i)=plot(X(i),Y(i));
htext(i)=text(X(i),Y(i),num2str(i),'fontsize',10);
hold on;
end
I wish to clear the plotted node after pause(.1) only plotted nodes clear and not clear the N,XX,YY,BS,area and plotted bs after pause(.1)

Respuesta aceptada

Michael Haderlein
Michael Haderlein el 22 de Abr. de 2015
delete(hplot)
  4 comentarios
singh
singh el 23 de Abr. de 2015
now code is working because BS plot in the under of first loop... but michael if i am not used htext,hplot or any other variable then how to delete all every loop tym...
Michael Haderlein
Michael Haderlein el 23 de Abr. de 2015
If you want to delete everything plotted in the axes, use
delete(get(gca,'children'))

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by