From: Stricky Stricky on 2 Apr 2010 18:01 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 legend('f','f2','f3'); 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....
From: Sadik on 2 Apr 2010 21:05 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. Best.
|
Pages: 1 Prev: two function in one plot and only one legend Next: optimization(fminmax) |