matlab legend order code example
Example: matlab legend order
x = linspace(0,pi);
p1 = plot(x,sin(x),'b');
hold on
p2 = plot(x,cos(x),'r');
legend([p2,p1],'cos(x)','sin(x)')
x = linspace(0,pi);
p1 = plot(x,sin(x),'b');
hold on
p2 = plot(x,cos(x),'r');
legend([p2,p1],'cos(x)','sin(x)')