Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Only show a few signals in legend
Date: Fri, 6 Nov 2009 09:55:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <hd0rpo$88k$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257501305 8468 172.30.248.35 (6 Nov 2009 09:55:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 6 Nov 2009 09:55:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2080005
Xref: news.mathworks.com comp.soft-sys.matlab:582964


Hi everyone!

I have a plot containing about 20 signals. I would like to display a legend which only contains a limited number of those signals...

Example: I only want to display a legend for signal A and C

If I use a code like this:

legend(['Signal A' 'C' ]) 

the legend will use the line color of Signal B instead of C.

a code like this

legend(['Signal A'  ' '  'C' ]) 

 will display all the linetypes in the legend witout giving a name for Signal B.

Anyone has an idea?
Thanks a lot
Henni