how to clean a panel which contains axes?

조회 수: 1 (최근 30일)
Stephani Kanga
Stephani Kanga 2020년 10월 11일
편집: Mario Malic 2020년 10월 11일
I have a function that generates an array of axes but the number of axes that are generated is not constant, neither their position. So, i want every time that main function calls this function, to clean the panel before the new axes will be produced.
  댓글 수: 3
Stephani Kanga
Stephani Kanga 2020년 10월 11일
for some reason i tried both
clf(panel, 'reset') and clf(panel) but it doesn't work
Mario Malic
Mario Malic 2020년 10월 11일
편집: Mario Malic 2020년 10월 11일
It should be done in the code where the figure is created (maybe prior to calling the function), or you can pass a figure handle to that function and clear it in there.

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

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 10월 11일
You can use findall() to find the children axes
delete(findall(p, 'type', 'axes')); % p is handle of panel

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by