How can I change the default settings for the 'linewidth' property before I plot a figure in MATLAB?
471 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 14 Feb. 2013
Kommentiert: Steven Lord
am 6 Mai 2020
I would like to change the 'LineWidth' property for all my figures by default for my current session of MATLAB.
Akzeptierte Antwort
MathWorks Support Team
am 31 Jan. 2017
You can set the default MATLAB linewidth property by setting the 'DefaultLineLineWidth' property of the root graphics object. When new lines are created, they will inherit this property from the root object.
set(0, 'DefaultLineLineWidth', 2);
For more information on setting default properties consult,
1 Kommentar
Steven Lord
am 6 Mai 2020
stairs returns a different type of graphics object than line. It creates a Stair object not a Line object.
figure
stairs(1:10, 1:10);
title('Before change')
% set(groot, 'DefaultStairLineWidth', 2)
objectType = 'Stair';
propertyName = 'LineWidth';
set(groot, ['Default', objectType, propertyName], 2)
figure
stairs(1:10, 1:10);
title('After change')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!