Path: news.mathworks.com!not-for-mail
From: "Vihang Patil" <vihang_patil@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Images in GUI
Date: Tue, 15 Jan 2008 05:39:01 +0000 (UTC)
Organization: Konem Solutions
Lines: 35
Message-ID: <fmhgtl$q9k$1@fred.mathworks.com>
References: <fmhg3f$e5q$1@fred.mathworks.com>
Reply-To: "Vihang Patil" <vihang_patil@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1200375541 26932 172.30.248.37 (15 Jan 2008 05:39:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 15 Jan 2008 05:39:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 413701
Xref: news.mathworks.com comp.soft-sys.matlab:445749


"Vaibhav Bedia" <vaibhav.bedia@gmail.com> wrote in message
<fmhg3f$e5q$1@fred.mathworks.com>...
> I am making a GUI in which i want to display two images at
> the sides.I saw the video on Matlabcental about setting
> background images using imshow() in the CreateFn of the axes
> created and tried it out.
> 
> The problem i am facing is that when i close Matlab and run
> the GUI again or run it on a different PC the axes 'tag'
> field becomes empty and the visibility is hence 'off'. Every
> time i have to rename the axes and go to the CreateFn of the
> axes.
> 
> I am using R2007b.
> 
> How can i solve this isssue?

Hello
If you have two images displayed separatly then you will
require to define 2 axes on the gui window. Drop down the
axes from the toolbox using guide into your fig.
Assuming, axes1 and axes2  are the variables.
You can then issues 

axes(handles.axes1); % this is used to set focus on the axes
 %currently in use
imshow('firstimage');

axes(handles.axes2);
imshow('secondimage');

HTH
Vihang