Starting in R2016a, you can specify the 'LineWidth' property the same way you do for plot. For example:
>> fplot(x1,[0,2],'k','LineWidth',2);
In R2015b and earlier releases, you have to search for the object and set the line width. To set the widths of all the lines to 2:
>> set(findall(gca, 'Type', 'Line'),'LineWidth',2);
Or, to set the width of one line:
>> set(findobj(gca, 'Type', 'Line', 'Linestyle', '--'), 'LineWidth', 2);
1 Comment
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/128898-how-to-change-the-line-width-for-fplot#comment_623479
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/128898-how-to-change-the-line-width-for-fplot#comment_623479
Sign in to comment.