"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.
"Steven Lord" <slord@mathworks.com> wrote in message <gdkkjj$p40$1@fred.mathworks.com>...
>
> "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
>
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.