ERRORBARLOGY Show the vertical errorbar line in log y scale plot when the data error is larger than data itself.
Matlab buidin ERRORBAR does not plot the vertical errobar line in a log y scale plot when data error is larger than data itself. See the screenshot for comparion.
Example:
x = logspace(1,3,20);
y = 5*(1 + 0.5*(rand(1,20)-0.5)).*x.^(-2);
y_err(1:13) = y(1:13)/2;
y_err(14:20) = y(14:end)*5;
errorbar(x,y,y_err,'o');
errorbarlogy;
Cite As
Zhang Jiang (2026). errorbarlogy (https://se.mathworks.com/matlabcentral/fileexchange/12449-errorbarlogy), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > 2-D and 3-D Plots > Line Plots > Errorbars >
- MATLAB > Graphics > 2-D and 3-D Plots > Line Plots > Log Plots >
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 | Update funtion to work properly when plotting multiple errorbar plots with non errobar plots in one figure. |
