How to change the size of error bar?

126 ビュー (過去 30 日間)
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2020 年 1 月 16 日
コメント済み: Star Strider 2020 年 1 月 17 日
I need to change the size of the vertical line of error bar. so I dont mean the size of cap like 'CapSize',18

採用された回答

Star Strider
Star Strider 2020 年 1 月 16 日
I am not certain what you want.
Try this:
errs = rand(1,10);
x = 1:10;
y = randi([10 20],1,10);
figure
plot(x, y)
hold on
heb = errorbar(x, y, errs, '.');
hold off
grid
heb.LineWidth = 2;
The error bars and the caps are both linewidth=2 here, with everything else being the default properties.
  6 件のコメント
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2020 年 1 月 17 日
I found it just change the linewitdth inside the error bar like this:
errorbar(...,'.m','CapSize',20,'LineWidth',2);
Thank you
Star Strider
Star Strider 2020 年 1 月 17 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by