From: Jiang Wen on
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!


Jiang Wen
From: mat001 on
"Jiang Wen" <amuser163(a)163.com> wrote in message <ht3dq9$ja9$1(a)fred.mathworks.com>...
> 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!
>
>
> Jiang Wen

if possible write here your part of code. Its hard to know the problem.
From: Walter Roberson on
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().
From: Steven Lord on

"Jiang Wen" <amuser163(a)163.com> wrote in message
news:ht3dq9$ja9$1(a)fred.mathworks.com...
>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.

Sure. There's no reason to say "Thou shalt not have two image objects on
the same axes 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!

Call IMAGESC with an output argument (the handle of the image object) and
DELETE the handle when you want to remove it from the axes.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com


From: Walter Roberson on
"Jiang Wen" <amuser163(a)163.com> wrote in message <ht3df0$po3$1(a)fred.mathworks.com>...
> Why in one axes can exist two image object?

>> why
Jack insisted on it.
>> why
Cleve told me to.
>> why
It's your karma.
>> why
Why not?