How to set specific colors in horizontal error bars?

5 ビュー (過去 30 日間)
Ivan Mich
Ivan Mich 2021 年 7 月 23 日
回答済み: KSSV 2021 年 7 月 23 日
I am using herrrobar function (https://www.mathworks.com/matlabcentral/fileexchange/3963-herrorbar?s_tid=FX_rc2_behav) I found in order to make horizontal error bars. The point is that I want to change colors of the errorbar to a specific color.
I used
x = 1:10;
y = sin(x);
z = std(y)*ones(size(x));
herrorbar(x,y,z, 'MarkerEdgeColor','red','MarkerFaceColor','red')
but no use.
Could you please help me?

採用された回答

KSSV
KSSV 2021 年 7 月 23 日
h = herrorbar(x,y,z) ;
Check the handle h, it has options to change color. You may play around with that. Like:
h(1).Color = 'r' ;

その他の回答 (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