Answers for "matlab legend order"

1

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)')
Posted by: Guest on May-14-2021

Browse Popular Code Answers by Language