MATLAB: How to change color of lines on legend

colorlegend

Is there any way to change the color of lines in the legend AFTER plotting the graph(like using Edit\axes properties)?

Best Answer

According to the Walter answer on above my problem solved easily using :
L(1) = plot(nan, nan, 'b-');
L(2) = plot(nan, nan, 'r--');
legend(L, {'first case', 'second case'})