How can I add error bars on a scatter plot using the calculated errors?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
ZZ
el 18 de Jul. de 2014
Editada: per isakson
el 1 de Mzo. de 2017
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!
0 comentarios
Respuesta aceptada
Star Strider
el 18 de Jul. de 2014
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Bar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!