Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Legend for Pcolor
Date: Tue, 21 Oct 2008 09:14:27 -0400
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <gdkkjj$p40$1@fred.mathworks.com>
References: <gdjdea$5hv$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1224594868 25728 144.212.105.187 (21 Oct 2008 13:14:28 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 21 Oct 2008 13:14:28 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
Xref: news.mathworks.com comp.soft-sys.matlab:496521



"Nathan " <natepatterson9@hotmail.com> wrote in message 
news:gdjdea$5hv$1@fred.mathworks.com...
>I have been using pcolor to plot my data which has already been compressed 
>to discrete values normally ranging from 0-6.  The commands are just
>
> pcolor(mymatrix)  %with discrete values ranging from 0 to 6
> colormap(grey(7))
>
> I would like to have a legend with entries for each discrete value and 
> have had no luck with the following:
>
> legend('LabelFor0','LabelFor1','LabelFor2','LabelFor3'....
>
> Does anyone know how to get a legend like that to work with pcolor?

What you're describing sounds more like a COLORBAR than a legend.

-- 
Steve Lord
slord@mathworks.com