Path: news.mathworks.com!newsfeed-00.mathworks.com!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!feeds.phibee-telecom.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!cs.uu.nl!news.stack.nl!aioe.org!.POSTED!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Inser text in graph
Date: Tue, 05 Jun 2012 18:55:13 -0500
Organization: Aioe.org NNTP Server
Lines: 24
Message-ID: <jqm699$gs2$1@speranza.aioe.org>
References: <jql6gl$lfg$1@newscl01ah.mathworks.com> <jql6l9$s09$1@speranza.aioe.org> <jql7m3$r02$1@newscl01ah.mathworks.com> <jqluve$v0m$1@speranza.aioe.org> <jqm0iv$jvj$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: 41dv6lByGMSdK8z0byowxg.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com comp.soft-sys.matlab:770143

On 6/5/2012 5:18 PM, Sanaa wrote:
> Thanks a lot for your help. I will explain more. I have to plot the
> trajectories of a map with three different parameters. So, I am having
> the code
>
  r_vec = [0.4, 07, 1.5];
  color_vec = ['r', 'b', 'k'];
...

>
> As you can see, I am having tow plot commands for just one ''r''. In the
> example you wrote you have sine and cos....I am confused

[lh,oh]=legend({'r=0.25';'r=0.5';'r=1'});
for ix=1:3,set(oh(ix*2),'color',color_vec(ix)),end


By your drawing as you did, there are six object handles, the first of 
which is the text the 2nd,4th,6th are the line objects corresponding to 
the legend texts (you can find this out by exploring the objects' 
properties in the object handle vector via set()--look at 'type' for 
starters).

--