The handles for the line objects in the legend are returned as part of the output from LEGEND. You can use the SET command to change the properties if you have the lines' handles:
x = 1:10;
y1 = rand(1,10);
y2 = randn(1,10);
plot(x,y1,'rx--',x,y2,'bo-')
[legh,objh] = legend('curve1','curve2');
There would be two line objects each (4 in total) associated to each of the line objects in the original plot.This can be found by:
lineh = findobj(objh,'type','line')
Two are used to display the lines' LineStyle with their Marker property set to 'none'. The other two are used to display the same markers as the lines in the plot with their linestyles set to 'none'. Setting the MarkerSize will only affect the appearance of the lines that have markers.
set(lineh,'MarkerSize',10)
Best Answer