File Exchange

image thumbnail


version (1.8 KB) by Frederic Moisy
Symmetrical error bars for logarithmic Y-axis


Updated 12 Sep 2006

View License

ERRORBARLOG(X,Y,E,...) plots the graph of vector X vs. vector Y with a logarithmic Y-axis, using symmetrical bars about the data points, ie: the bars are such that Y is the geometric mean (instead of arithmetic mean) of the lower and upper bars. The total length of the error bar is 2E.

ERRORBARLOG has the same syntax as the original Matlab's ERRORBAR function. The only difference is that while ERRORBAR displays the bars symmetrically for a linear Y-axis (ie: Y is the arithmetic mean of the lower and upper bars), ERRORBARLOG displays them symmetrically for a logarithmic Y-axis.


y=5*(1 + 0.5*(rand(1,20)-0.5)).*x.^(-2);

Cite As

Frederic Moisy (2020). errorbarlog.m (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Sam Winnow

Very useful program.

K Chakrabarti

Good work but needs modification if XScale is


I saw your program module. If you more graphical scale (diversion error,accumulate error,absulate error etc.) and collocated all errors result one scale than your`s program module is satisfactorly. I am a questions to you. While analysis results had only logarithm scaled? thank you...


help text improved

help text improved

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

Inspired: superbar