Errorbar plot has no connecting lines

I just used the example from doc,
x = 1:10:100;
y = [20 30 45 40 60 65 80 75 95 90];
err = 8*ones(size(y));
errorbar(x,y,err)
However, the figure has no connecting lines, unlike the documentation:

1 件のコメント

Star Strider
Star Strider 2016 年 9 月 19 日
What version of the documentation did you use? The current online documentation is for R2016b, and that code works correctly for me (connects the centres of the bars with a line, and plotting the error bars) in R2016b.
Type:
doc errorbar
in your Command Window to get the documentation for your version. There could be version differences.

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

 採用された回答

fireattack
fireattack 2016 年 9 月 23 日

0 投票

It is fixed in R2016b.

その他の回答 (1 件)

mbonus
mbonus 2016 年 9 月 19 日

0 投票

errorbar(x,y,err,'-b')

4 件のコメント

fireattack
fireattack 2016 年 9 月 19 日
Doesn't work, just changed colors..
mbonus
mbonus 2016 年 9 月 19 日
does this do anything?
errorbar(x,y,err,'*b')
it won't add lines, it's just to check if you're able to modify the line properties besides just the color. If that works then try
errorbar(x,y,err,'--b')
mbonus
mbonus 2016 年 9 月 19 日
編集済み: mbonus 2016 年 9 月 19 日
Or after you plot it you could try
set(gca,'linestyle','--')
fireattack
fireattack 2016 年 9 月 23 日
編集済み: fireattack 2016 年 9 月 23 日
thanks for the following up. I can't reproduce my original problem on another computer, so I guess something was wrong with my setup. Luckily after updating my Matlab to 2016b it fixed itself.

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

カテゴリ

ヘルプ センター および File ExchangeErrorbars についてさらに検索

製品

タグ

質問済み:

2016 年 9 月 19 日

編集済み:

2016 年 9 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by