Why are errorbar ticks exaggerated when using log scale on the X axis?
1 次查看(过去 30 天)
显示 更早的评论
Hello, when I am making figures and using a log scale on the X-axis, this greatly exaggerates my y-axis errorbar ticks to a ridiculous degree:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/159042/image.jpeg)
Why? And what can I do to return them to normal size without having to use scripts like errorbar_ticks (which is very finnicky and doesn't always work).
Thanks in advance.
0 个评论
采纳的回答
dpb
2016-12-17
编辑:dpb
2016-12-18
"Why?"
'Cuz they're drawn as a given length that is percentage of x value which, in log coordinates aren't symmetric nor nearly the same percentage of the log(x) as of (x).
If you have version supporting HG2, there's a new pair of properties <X[Positive|Negative]Delta> that looks like should let you compute a reasonable length and set it altho I can't test here to see if actually does the job.
With HG "classic" all you can do is go "handle diving" and find the handles of the lines drawn for the error bars and recompute a different start-stop location for them from doing the log transform yourself. Using the property editor in a simpler figure for starters to discover the organization would probably be the easiest way to build a fixup script.
Meanwhile, this would be a good example to submit to TMW as a bug fix; nobody thought to test errorbar for semilogx plots, it appears.
ADDENDUM
In HG1 (R2012b) errorbar is m-file and the x bar-lengths are computed as
tee = (max(x(:))-min(x(:)))/100; % make tee .02 x-distance for error bars
xl = x - tee;
xr = x + tee;
It's possible you could find the similar logic in your release and make a fixup although since errorbar doesn't have a formal semilogx property, the axis property won't yet be set to query...which is probably what TMW will say regarding the idea it's a bug on further reflection.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Errorbars 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!