How can I change the default settings for the 'linewidth' property before I plot a figure in MATLAB?

163 ビュー (過去 30 日間)
I would like to change the 'LineWidth' property for all my figures by default for my current session of MATLAB.

採用された回答

MathWorks Support Team
MathWorks Support Team 2017 年 1 月 31 日
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 件のコメント
Steven Lord
Steven Lord 2020 年 5 月 6 日
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')

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2006b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by