From: "Sadik " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Exclude line from plot ledgend
Date: Tue, 20 Jan 2009 00:15:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 22
Message-ID: <gl3529$e9s$>
References: <gl2mh5$fkt$>
Reply-To: "Sadik " <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1232410505 14652 (20 Jan 2009 00:15:05 GMT)
NNTP-Posting-Date: Tue, 20 Jan 2009 00:15:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: comp.soft-sys.matlab:512585

"Sebastian Gatzka" <> wrote in message <gl2mh5$fkt$>...
> Hello World.
> I have added a line object to my plot, which is displayed in the legend now.
> I have read, that I can suppress the output inside the legend, but havent found a way of doing it by now.
> What is the right syntax for it?
> Thanks in advance. S.

Hello Sebastian,

To do that, you need the handle to the legend.

So, let us say you have 4 such lines plotted on top of each other, and you say:

legendHandle = legend('line1','line2','line3','line4');

then, you would like to suppress line4. What you should do is


Hope this helps.