|
TideMan <mulgor@gmail.com> wrote in message <dc2eee64-a46f-41fb-aebf-da9acfc7c612@j9g2000prh.googlegroups.com>...
> On Jun 21, 3:19?pm, "Juliette Salexa" <juliette.physic...@gmail.com>
> wrote:
> > Hello, I only want 2 of my 4 curves to actually have legend entries (ie, I want a legen that only has 2 entries in it), how do I remove the unwanted two ??
>
> Rather than turning them off, only include the ones you want:
> hold on
> h1=plot(t,x1);
> h2=plot(t,x2);
> h3=plot(t,x3);
> h4=plot(t,x4);
> hold off
> legend([h2 h4],'Second','Fourth')
Is there an alternate format for this? I have a contour plot that also has three curves.
because I include the code:
[W H] = meshgrid(40:10:120, 140:10:190);
the above does not work
I get the error
??? Operands to the || and && operators must be convertible to logical
scalar values.
Error in ==> legend at 200
elseif narg > 0 && ~ischar(varargin{1}) && ...
any help?
|