Continuous Error bars
73 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ocram
el 27 de Mayo de 2012
Comentada: Veena Chatti
el 1 de Sept. de 2020
Hi all, i want to plot the mean of a track with the standard deviation. I tried this, by using the function errorbar, This is acceptable, but I was looking for something different, such as a continuous band. Something like this one:
Thanks, M
0 comentarios
Respuesta aceptada
Tom Lane
el 27 de Mayo de 2012
You may be able to modify this to suit your needs:
x = linspace(0,1,20)';
y = sin(x);
dy = .1*(1+rand(size(y))).*y; % made-up error values
fill([x;flipud(x)],[y-dy;flipud(y+dy)],[.9 .9 .9],'linestyle','none');
line(x,y)
4 comentarios
Veena Chatti
el 1 de Sept. de 2020
WOW. Thanks. No file downloads, no mess, no fuss, no fretting about learning another programming language or environment, or exporting a bunch of data elsewhere...Just five simple lines of code and the relief of saving a whole lot of tedium to make something seemingly simple work!
Más respuestas (1)
Oleg Komarov
el 27 de Mayo de 2012
You can choose one of the following in the FEX:
- http://www.mathworks.com/matlabcentral/fileexchange/27485
- http://www.mathworks.com/matlabcentral/fileexchange/26311-shadederrorbar
- http://www.mathworks.com/matlabcentral/fileexchange/2683-confplot
- http://www.mathworks.com/matlabcentral/fileexchange/10843-errorfill
User defined functions have to be placed into a folder and that folder should be added to the MATLAB path. See addpath(), savepath() or on the menu bar File > Set path
0 comentarios
Ver también
Categorías
Más información sobre Errorbars 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!