Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Will subplot work for uipanel?
Date: Mon, 27 Aug 2007 20:42:50 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 45
Message-ID: <favd0a$amh$1@fred.mathworks.com>
References: <fav9te$p6a$1@fred.mathworks.com> <favc4v$p9b$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1188247370 10961 172.30.248.37 (27 Aug 2007 20:42:50 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 27 Aug 2007 20:42:50 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1030060
Xref: news.mathworks.com comp.soft-sys.matlab:425813



Thank you. This works for me too. Now I just wish I could
find that earlier incorrect message I read on this newsgroup
to add a correction to it...

"Steven Lord" <slord@mathworks.com> wrote in message
<favc4v$p9b$1@fred.mathworks.com>...
> 
> "G.A.M. " <x0zero@gmail.com> wrote in message 
> news:fav9te$p6a$1@fred.mathworks.com...
> >I want to create multiple plots inside a specific area of a
> > figure. I am attempting to do that by using a uipanel and
> > subplot. However, in these newsgroups I saw a message that
> > someone was having trouble getting subplot to work with a
> > uipanel. Is it possible to use subplot on a uipanel?
> >
> > If not, what is a better (easier) way to create a variable
> > number of plots in a certain area of a figure?
> >
> > Maybe I could use docking somehow... this is all new to me,
> > so any suggestions are appreciated. Thanks
> 
> Using the first two lines of the example in the UIPANEL
reference page:
> 
>
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/uipanel.html
> 
> h = figure;
> hp = uipanel('Title','Main Panel','FontSize',12,...
>              'BackgroundColor','white',...
>              'Position',[.25 .1 .67 .67]);
> 
> sp1 = subplot(2, 2, 1, 'Parent', hp);
> plot(1:10);
> sp4 = subplot(2, 2, 4, 'Parent', hp);
> surf(peaks);
> 
> I tested this in MATLAB 7.4 (R2007a) and it worked fine.
> 
> -- 
> Steve Lord
> slord@mathworks.com 
> 
>