From: Anastasia P on
I have a GUI, where I have an axes control inside a uipanel .
I need to subplot images, not of a constant number.
When the new plot has more images there is no problem, as the old are being overwritten, but in the case I have less, then it overwrites the first, but the last of the previous time remain.
So, I need to clear my previous subplotting before the new.
I tried " cla " , but it only clears the last of the subplots, for some reason it seems to "remember" just the last one.. " clf " on the other hand clears all my GUI...
How can I handle this?
From: Walter Roberson on
Anastasia P wrote:
> I have a GUI, where I have an axes control inside a uipanel .
> I need to subplot images, not of a constant number.
> When the new plot has more images there is no problem, as the old are
> being overwritten, but in the case I have less, then it overwrites the
> first, but the last of the previous time remain.
> So, I need to clear my previous subplotting before the new. I tried "
> cla " , but it only clears the last of the subplots, for some reason it
> seems to "remember" just the last one.. " clf " on the other hand
> clears all my GUI...
> How can I handle this?

delete(findobj(0,'type','axes'))

or is it 'axis' ? I can never remember which is which.
From: Anastasia P on
It is an axes yes, and this works!!!!! THANK YOU SO MUCH!!!
I just need to recreate the axes afterwards, but that's easy!!
THANKS AGAIN!!!!!!!! :-)


Walter Roberson <roberson(a)hushmail.com> wrote in message <g6IIn.5985$yx.4537(a)newsfe13.iad>...
> Anastasia P wrote:
> > I have a GUI, where I have an axes control inside a uipanel .
> > I need to subplot images, not of a constant number.
> > When the new plot has more images there is no problem, as the old are
> > being overwritten, but in the case I have less, then it overwrites the
> > first, but the last of the previous time remain.
> > So, I need to clear my previous subplotting before the new. I tried "
> > cla " , but it only clears the last of the subplots, for some reason it
> > seems to "remember" just the last one.. " clf " on the other hand
> > clears all my GUI...
> > How can I handle this?
>
> delete(findobj(0,'type','axes'))
>
> or is it 'axis' ? I can never remember which is which.