Hello, My plot has two many lines but with only two different colors. When I want to add the legend I just want to write the legend for those two colors, but in the legend it shows me the same color. Can anyone please tell me how I can skip the lines with the same color?
Here is my code
p1=line([t1 t1]',[0 1],'color','red');hold onp2=line([t2 t2]',[0 1],'color','green');legend([p1 p2],'T1','T2')
Best Answer