Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
help with legend

Subject: help with legend

From: Stricky Stricky

Date: 2 Apr, 2010 22:01:20

Message: 1 of 2

hi there, I need to do more functions in one plot

f=plot(xn,a+b*xn+c*xn.^2+d*xn.^3,'Color',[k l m]); and for the points in same color as the line
plot(x,y,'x','Color',[k l m],'MarkerSize',10,'LineWidth',2)

now I want to do legend but only for functions, not for points, couse, when I type
the first row is function line in correct color with correct name - ist ok, than the programm take another cyclic round
and in the legend come up 2 new rows (there are 3 of them now), so first is ok, but second - has instead of line- mark X - as a point - named f2, and the third is again the line type of new function with correct name... why the hell is in the legend the point-plot comming up? How should I delete it from legend? thx....

Subject: help with legend

From: Sadik

Date: 3 Apr, 2010 01:05:26

Message: 2 of 2

How about this one: You plot the functions first, put the legend and then plot the dotted ones. If this even doesn't work, you can use "hold on" and make each function plot separately, put your legend and then plot the dotted ones.


Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us