|
"Yannos M" wrote in message <k73f9o$gg7$1@newscl01ah.mathworks.com>...
> Hi,
>
> I have made a code drawing grids with lines of different LineWidths. However, I am not able to make a legend showing the lines with a number next to them corresponding to the LineWidth.
> Can anybody help me out with this?
>
> Thanks a lot.
>
> Yannos
Without knowing what exactly is the problem, here is an example that might help
for ii = 1:5
hl(ii) = line([0 1],[0 ii], ...
'LineWidth',ii, ...
'DisplayName',num2str(ii));
end
legend(hl)
|