advanced customization of legend markers in matlab
问题 It is relatively simple to add basic modifications to markers in matlab legends. The legend produced by the following code snippet (): hold on h = plot(inf,inf,'ob',inf,inf,'r+'); legend(h,'Data1','Data2'); Can be easily modified to: using the following code: [~,~,icons,~] = legend(h,'Data1','Data2'); set(icons(1),'LineStyle','-') set(icons(2),'LineStyle','-') However things become fairly complicated if I want to correctly legend objects such as (circle is not in the middle of a line) or