How do I retrieve the legend icons property from an existing legend?
Hi,
I have a script that automatically adjusts an existing figure’s linewidth, among other things. It does not work the same with Matlab 2016b. I have modified the script to be 2016b compatible for the most part. It updates the plot line widths but the lines in the legend are not updated. I need to add extra commands in the script to also update the lines in the legend. If I build the legend, I can retrieve the icons property and it is easy:
[~,icons] = legend(‘data 1′,’data 2’);
set(icons,’linewidth’,2);
I need to do this with an existing legend and I cannot find how to retrieve this ‘icons’ propertyHi,
I have a script that automatically adjusts an existing figure’s linewidth, among other things. It does not work the same with Matlab 2016b. I have modified the script to be 2016b compatible for the most part. It updates the plot line widths but the lines in the legend are not updated. I need to add extra commands in the script to also update the lines in the legend. If I build the legend, I can retrieve the icons property and it is easy:
[~,icons] = legend(‘data 1′,’data 2’);
set(icons,’linewidth’,2);
I need to do this with an existing legend and I cannot find how to retrieve this ‘icons’ property Hi,
I have a script that automatically adjusts an existing figure’s linewidth, among other things. It does not work the same with Matlab 2016b. I have modified the script to be 2016b compatible for the most part. It updates the plot line widths but the lines in the legend are not updated. I need to add extra commands in the script to also update the lines in the legend. If I build the legend, I can retrieve the icons property and it is easy:
[~,icons] = legend(‘data 1′,’data 2’);
set(icons,’linewidth’,2);
I need to do this with an existing legend and I cannot find how to retrieve this ‘icons’ property plot MATLAB Answers — New Questions