how to clean a panel which contains axes?

Illustration
Ottosaul - 2020-10-28T10:33:56+00:00
Question: how to clean a panel which contains axes?

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.

Expert Answer

Profile picture of John Michell John Michell answered . 2025-11-20

You can use findall() to find the children axes

delete(findall(p, 'type', 'axes')); % p is handle of panel


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!