The following graph shows my question:

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
source
share