Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How can I plot multiple graphs on the same single plot using GUI?
Date: Tue, 18 Nov 2008 18:43:02 +0000 (UTC)
Organization: Lulea University of Technology
Lines: 27
Message-ID: <gfv2bm$58o$1@fred.mathworks.com>
References: <gfrv91$cep$1@fred.mathworks.com> <gfs0bb$quv$1@fred.mathworks.com> <gfuptm$ihj$1@fred.mathworks.com> <gfuvrk$4l4$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1227033782 5400 172.30.248.38 (18 Nov 2008 18:43:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 18 Nov 2008 18:43:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1595763
Xref: news.mathworks.com comp.soft-sys.matlab:501533

"Adam" <not.real@email.com> wrote in message <gfuvrk$4l4$1@fred.mathworks.com>...
> "Bernard Lee" <leeshijun@gmail.com> wrote 
> 
> > Your method solved my problem...but now i dont know how to update the legend of the graph.
> 
> What do you want to update?  Just the names?
> 
> legendString = {'one', 'two'};
> 
> hL = legend(legendString);
> 
> Now if you modify legendString you can update the legend
> 
> legendString{1} = 'three';
> set(hL, 'String', legendString)
> 
> Sorry if this doesn't answer your question (I didn't read everything because I would approach the problem differently)
> 
> ~Adam



I accidentally posted a reply higher up in this thread... Didn't know that was possible. Anyway, I answered the legend question there as well.

Sorry about double postings...

/JC