Combination of plot() and errorbar_plus() can solve many prolems with the original errorbar() and can provide some more useful flexibilities. With errorbar_plus, horizontal plot of errors is possible. Different markers can be used instead of the usual "I " shaped bar. The wrong annotation of legend() when plotting with 2 or more data sets can be avoided with appropriate code arrangement.
Users are welcomed to add some other controls such as line style to errorbar.
Usage and example:
- see comments in errorbar_plus.m file, or
- download into matlab directory and type "help errorbar_plus"
Chuong Nguyen (2020). Enhancement to errorbar() plot (https://www.mathworks.com/matlabcentral/fileexchange/5383-enhancement-to-errorbar-plot), MATLAB Central File Exchange. Retrieved .
The main advantage of 'errobar_plus' function, which improves the original 'errorbar' function, is to make drawing horizontal error bars possible. Using the original function, drawing horizontal errorbars is possible by changing camera viewpoint; also simultaneous drawing of horizontal and vertical error bars, which I tried to do, is not possible. This m-file, removing this problem, makes 'errobar_plus' a powerful tool for drawing error bars.
Too flexible towards dimensions of input. Please add some error handling.
quite neat! thanks
to correct spellings