clear the ploted nodes only

조회 수: 1 (최근 30일)
singh
singh 2015년 4월 22일
편집: singh 2015년 4월 25일
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)

채택된 답변

Michael Haderlein
Michael Haderlein 2015년 4월 22일
delete(hplot)
  댓글 수: 4
singh
singh 2015년 4월 23일
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 2015년 4월 23일
If you want to delete everything plotted in the axes, use
delete(get(gca,'children'))

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by