Code: Select all
figure(1);
hold on;
l1 = plot(1:10);
l2 = plot(2:2:20);
l3 = plot(3:3:30);
Code: Select all
legend([l1,l3],'Line-1','Line-3') % This will show legend for l1 & l3 onlyCode: Select all
figure(1);
hold on;
l1 = plot(1:10);
l2 = plot(2:2:20);
l3 = plot(3:3:30);
Code: Select all
legend([l1,l3],'Line-1','Line-3') % This will show legend for l1 & l3 only