errorbarlogx.m

版本 1.0.0.0 (2.0 KB) 作者: Frederic Moisy
Error bar plot for X-axis in log scale
8.3K 次下载
更新时间 2006/1/24

查看许可证

ERRORBARLOGX Homogenize the error bars for X-axis in log scale.

ERRORBARLOGX turns the X-axis of the current error bar plot to log scale, and homogonizes the length of the horizontal segements which terminate the vertical error bars.

By default, Matlab's ERRORBAR draws vertical error bars which are terminated by small horizontal segments of uniform length for the X-axis in linear scale. But when turning the X-axis to log scale, these segments become uneven. Using ERRORBARLOGX makes them uniform again.

ERRORBARLOGX(N) specifies the relative length of the horizontal segments, normalized with the total range of the data. By default, N=0.01 is used.

Limitations: ERRORBARLOGX acts only on the last drawn curve. If this curve is not an error bar plot, it won't work.

Example:
x=logspace(1,3,20);
y=5*(1 + 0.5*(rand(1,20)-0.5)).*x.^(-2);
errorbar(x,y,y/2,'o-');
errorbarlogx(0.03);

引用格式

Frederic Moisy (2024). errorbarlogx.m (https://www.mathworks.com/matlabcentral/fileexchange/9715-errorbarlogx-m), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R14SP1
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Graph and Network Algorithms 的更多信息
致谢

启发作品: superbar, errorbarlogy, eb_ticklength

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0