From: Jiang Wen on
Thanks Walter Roberson and every one,
you are right, I use the 'hold on' and that is the reason of the problem. Now I add a sentence 'hold off', it works normally.

Wenjiang


Walter Roberson <roberson(a)hushmail.com> wrote in message <eKbJn.73814$0M5.22267(a)newsfe07.iad>...
> Jiang Wen wrote:
> > I use an axes to show a Image(256*176) with the function 'imagesc' and
> > then draw a roi and a line on it. Then I show another Image(208*256)
> > with the function 'imagesc' . I found in the axes there are two image
> > objects, they can be seen at the same time.
> > what's the problem? I only want it show one image one time. How can I
> > delete a image object? Thanks!
>
> You probably have a 'hold on' statement.
>
> If you want to delete an object that you have the handle to, then use
> delete(). If you do not have a handle to it, then you can find the
> handle using findobj().