File Exchange

image thumbnail

plot errorbars on both axes

version (2.24 KB) by Eran Ofek
errorbars on x and y axes with many options.

1 Download

Updated 19 Jan 2006

No License

Plot graph with error bars on both axes.
% simple example:
Data = [1 10 1; 2 9 0.5; 3 8 0.7];

Cite As

Eran Ofek (2021). plot errorbars on both axes (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)


Very very useful code.
@ Jonathan - How to make the error bars invisible behind the makers? It would be great if you can help me with this.


Edgardo Garcia

Very useful.

Johannes Kritzinger

Roman -

Very useful

Dimiter Prodanov

Handy addition to the standard plot command


I use errorxy, but I've modified it so that the data point markers plot over the error bars and so that I can change the thickness of the data point markers. The code is structured well so that it is easy to modify.

John D'Errico

Seems useful. I have only a couple of minor points. The use of property/value pairs is very valuable for tools like this where you have many different parameters, most of which have default values. BUT - do not make those properties case sensitive as has been done here. The user does not want to remember that to specify which column the y errors comes from, they must use the property 'ColYe'. Instead, allow them to specify 'colye' instead. Your code should ignore case. The function "lower" can help you here. Next, its also nice to allow the user to shorten a property, as long as that shortening is unambiguous. Thus, properties 'hist', 'histfacecolor' and 'histedgecolor' should be able to be shortened to as small as 'hist', 'histf', or 'histe'. Strmatch or strncmpi can help with this.

Jy T

A great m files that should be on standard Matlab distribution. Well documented and working all right.

MATLAB Release Compatibility
Created with R14SP3
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: superbar

Community Treasure Hunt

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

Start Hunting!