Borrar filtros
Borrar filtros

Why are errorbar ticks exaggerated when using log scale on the X axis?

1 visualización (últimos 30 días)
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:
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.

Respuesta aceptada

dpb
dpb el 17 de Dic. de 2016
Editada: dpb el 18 de Dic. de 2016
"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.

Más respuestas (0)

Categorías

Más información sobre Errorbars en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by