Default plot settings for fplot and errorbar

3 ビュー (過去 30 日間)
L. Borrel
L. Borrel 2017 年 10 月 4 日
回答済み: Carl 2017 年 10 月 13 日
I found that the default plot settings that apply to plots in general don't apply to certain types of plots.
For example:
set(groot, 'DefaultLineLineWidth', 5);
plot(1:10,1:10);
gives the expected result with an increased line width.
But:
set(groot, 'DefaultLineLineWidth', 5);
errorbar(1:10,1:10);
keep default line width. The same thing happens with fplot.
Is it a bug or is it the expected behavior?
Does anyone know how to change the default line width for errorbar or fplot?

採用された回答

Carl
Carl 2017 年 10 月 13 日
Instead of doing:
set(groot, 'DefaultLineLineWidth', 5);
use the following:
set(groot, 'DefaultErrorBarLineWidth', 5);
The documentation page here shows the syntax for specifying default values: 'default' + ObjectType + PropertyName. If you run:
p = plot(1:10)
you can see that p is a "Line" object, whereas running:
e = errorbar(1:10,1:10)
shows that e is an object of type "ErrorBar" with its own default settings for LineWidth.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeErrorbars についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by