Visually halfway between two points on the x-axis scale

The following graph shows my question:

enter image description here

I would like to add a line between points 1e-1 and 1e-2. So I thought it was just (1e-1 + 1e-2) / 2.

But for a magazine scale that is not "in the middle."

How can I calculate the “visual” average between them or any two points in this case? Code used

clc; clear all;
y = logspace(-3,0,100);
x = y;
semilogx(y,x);
hold on
plot([1e-1 1e-1],get(gca,'YLim'),'k--'); 
plot([1e-2 1e-2],get(gca,'YLim'),'k--');

midway = (1e-1+1e-2)/2;

plot([midway midway],get(gca,'YLim'),'k--');

thank

+4
source share
1 answer
a=1e-2
b=1e-1
midway = exp((log(a)+log(b))/2)

Take a journal to get positions in the journal scale, then do the math.

You can simplify this formula, and in the end you will get the geometric mean value:

midway=sqrt(a*b)
+7
source

All Articles