Difference between errorbar and errorbarxy (function)
2 次查看(过去 30 天)
显示 更早的评论
Hello,
I'm calculating and plotting a mean-Values and standard deviation:
If I plot it via errorbar, I get:
....
errorbar(M1(:,2),M1(:,1),S1(:,2),S1(:,1),'-o','both','LineWidth',1.5,'MarkerFaceColor','cyan','MarkerSize',10,'MarkerEdgeColor','black','DisplayName',label1{1})
....
errorbar(M2(:,2),M2(:,1),S2(:,2),S2(:,1),'-s','both','LineWidth',1.5,'MarkerFaceColor','yellow','MarkerSize',10,'MarkerEdgeColor','black','DisplayName',label2{1})
...
If I plot with errorbarxy function, I get:
errorbarxy(M1(:,2),M1(:,1),S1(:,2),S1(:,1))
....
errorbarxy(M1(:,2),M1(:,1),S1(:,2),S1(:,1))
....
Why, I'm getting different line length? I tnink an errorplot has a wrong length, because there are each one value for x-axis and y-axis?! What is the better way to plot main + std?
values are:
M1 =
0.0570 0.9098
0.0860 0.8615
0.7741 0.1542
0.9682 0.0200
0.9874 0.0016
M2 =
0.0591 0.9049
0.2164 0.7222
0.7954 0.1332
0.9703 0.0091
0.9761 0.0082
S1 =
0.0196 0.0220
0.0356 0.0585
0.0349 0.0636
0.0354 0.0347
0.0027 0.0027
S2 =
0.0323 0.0461
0.2140 0.2619
0.2021 0.1885
0.0216 0.0158
0.0171 0.0141
4 个评论
dpb
2020-7-6
>> which -all errorbar
C:\ML_R2019b\toolbox\matlab\specgraph\errorbar.m
errorbar is a built-in method % tall method
>> which -all errorbarxy
'errorbarxy' not found.
>>
errorbarxy is NOT a TMW-supplied function but there is one for the job; my recommendation is to use it.
The FEX submission may be just perfectly fine, but why throw confusion between two functions that may have chosen different input arrangements into the mix besides?
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Errorbars 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!