|
"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
>
Thank you, it's exactly what I was looking for.
|