How can I add error bars on a scatter plot using the calculated errors?

조회 수: 2 (최근 30일)
ZZ
ZZ 2014년 7월 18일
편집: per isakson 2017년 3월 1일
I want to add error bars to this graph: (SEM is the standard error mean for Dt, and I want to add error bars only onto Dt in the graph)
dfs= [ 0 4.5000 9.0000 13.5000 18.0000 22.5000 27.0000 31.5000]
Dt= [ 4.1681 4.1719 3.8631 4.1915 3.2843 3.2850 3.2308 3.2795]
R= [ 6.2272 7.4491 8.4765 7.7533 9.3598 12.9844 13.9740 9.2937]
f(1)=figure; plot (dfs.',Dt,'ro',dfs.',R,'bo');
SEM = [ 0.0142 0.0142 0.0127 0.0164 0.0183 0.0224 0.0193 0.0232];
Thanks!

채택된 답변

Star Strider
Star Strider 2014년 7월 18일
The SEM values are sufficiently small that they appear as small horizontal bars. This plots both of your data series, with the error bars only plotted for Dt:
figure(1)
errorbar(dfs, Dt, SEM, 'ro')
hold on
plot(dfs,R,'bo')
hold off

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Bar Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by