semi-log plot

{{short description|Type of graph}}

File:LogLinScale.svg on the y-axis (vertical), and a linear scale on the x-axis (horizontal). Plotted lines are: y = 10x (red), y = x (green), y = log(x) (blue).]]

File:LinLogScale.svg on the x axis, and a linear scale on the y axis. Plotted lines are: y = 10x (red), y = x (green), y = log(x) (blue).]]

In science and engineering, a semi-log plot/graph or semi-logarithmic plot/graph has one axis on a logarithmic scale, the other on a linear scale. It is useful for data with exponential relationships, where one variable covers a large range of values.(1) {{cite web|first=M.|last=Bourne|url=http://www.intmath.com/Exponential-logarithmic-functions/7_Graphs-log-semilog.php|title= Graphs on Logarithmic and Semi-Logarithmic Paper|work=Interactive Mathematics|publisher=www.intmath.com|access-date=October 26, 2021|archive-url=https://web.archive.org/web/20210806044859/https://www.intmath.com/exponential-logarithmic-functions/7-graphs-log-semilog.php|archive-date=August 6, 2021|url-status=live}}
(2) {{cite web|first=Murray|last=Bourne|date=January 25, 2007|url=https://www.intmath.com/blog/mathematics/interesting-semi-logarithmic-graph-youtube-traffic-rank-526|title=Interesting semi-logarithmic graph – YouTube Traffic Rank|work=SquareCirclez: The IntMath blog|publisher=www.intmath.com|access-date=October 26, 2021|archive-url=https://web.archive.org/web/20210226161954/https://www.intmath.com/blog/mathematics/interesting-semi-logarithmic-graph-youtube-traffic-rank-526|archive-date=February 26, 2021|url-status=live}}

All equations of the form y=\lambda a^{\gamma x} form straight lines when plotted semi-logarithmically, since taking logs of both sides gives

:\log_a y = \gamma x + \log_a \lambda.

This is a line with slope \gamma and \log_a \lambda vertical intercept. The logarithmic scale is usually labeled in base 10; occasionally in base 2:

:\log (y) = (\gamma \log (a)) x + \log (\lambda).

A log–linear (sometimes log–lin) plot has the logarithmic scale on the y-axis, and a linear scale on the x-axis; a linear–log (sometimes lin–log) is the opposite. The naming is output–input (yx), the opposite order from (x, y).

On a semi-log plot the spacing of the scale on the y-axis (or x-axis) is proportional to the logarithm of the number, not the number itself. It is equivalent to converting the y values (or x values) to their log, and plotting the data on linear scales. A log–log plot uses the logarithmic scale for both axes, and hence is not a semi-log plot.

Equations

The equation of a line on a linear–log plot, where the abscissa axis is scaled logarithmically (with a logarithmic base of n), would be

: F(x) = m \log_{n}(x) + b. \,

The equation for a line on a log–linear plot, with an ordinate axis logarithmically scaled (with a logarithmic base of n), would be:

: \log_{n}(F(x)) = mx + b

: F(x) = n^{mx + b} = (n^{mx})(n^b).

= Finding the function from the semi–log plot =

== Linear–log plot ==

On a linear–log plot, pick some fixed point (x0, F0), where F0 is shorthand for F(x0), somewhere on the straight line in the above graph, and further some other arbitrary point (x1, F1) on the same graph. The slope formula of the plot is:

: m = \frac {F_1 - F_0}{\log_n (x_1 / x_0)}

which leads to

: F_1 - F_0 = m \log_n (x_1 / x_0)

or

: F_1 = m \log_n (x_1 / x_0) + F_0 = m \log_n (x_1) - m \log_n (x_0) + F_0

which means that

F(x) = m \log_n (x) + \mathrm{constant}

In other words, F is proportional to the logarithm of x times the slope of the straight line of its lin–log graph, plus a constant. Specifically, a straight line on a lin–log plot containing points (F0x0) and (F1x1) will have the function:

: F(x) = (F_1 - F_0) {\left[\frac{\log_n (x / x_0)}{\log_n(x_1 / x_0)}\right]} + F_0 = (F_1 - F_0) \log_{\frac{x_1}{x_0}}{\left(\frac{x}{x_0}\right)} + F_0

== log–linear plot ==

On a log–linear plot (logarithmic scale on the y-axis), pick some fixed point (x0, F0), where F0 is shorthand for F(x0), somewhere on the straight line in the above graph, and further some other arbitrary point (x1, F1) on the same graph. The slope formula of the plot is:

: m = \frac {\log_n (F_1 / F_0)}{x_1 - x_0}

which leads to

: \log_n(F_1 / F_0) = m (x_1 - x_0)

Notice that nlogn(F1) = F1. Therefore, the logs can be inverted to find:

: \frac{F_1}{F_0} = n^{m(x_1 - x_0)}

or

: F_1 = F_0n^{m(x_1 - x_0)}

This can be generalized for any point, instead of just F1:

: F(x) = {F_0} n^{\left(\frac {x-x_0}{x_1-x_0}\right) \log_n (F_1 / F_0)}

Real-world examples

= Phase diagram of water =

In physics and chemistry, a plot of logarithm of pressure against temperature can be used to illustrate the various phases of a substance, as in the following for water:

File:Phase diagram of water.svg of water. The Roman numerals indicate various ice phases.]]

= 2009 "swine flu" progression =

While ten is the most common base, there are times when other bases are more appropriate, as in this example:{{Explain|date=April 2023|reason=No reason given for why base 2 is more appropriate in this case.}}

File:Influenza-2009-cases-logarithmic.png.]]

Notice that while the horizontal (time) axis is linear, with the dates evenly spaced, the vertical (cases) axis is logarithmic, with the evenly spaced divisions being labelled with successive powers of two. The semi-log plot makes it easier to see when the infection has stopped spreading at its maximum rate, i.e. the straight line on this exponential plot, and starts to curve to indicate a slower rate. This might indicate that some form of mitigation action is working, e.g. social distancing.

= Microbial growth =

In biology and biological engineering, the change in numbers of microbes due to asexual reproduction and nutrient exhaustion is commonly illustrated by a semi-log plot. Time is usually the independent axis, with the logarithm of the number or mass of bacteria or other microbe as the dependent variable. This forms a plot with four distinct phases, as shown below.

File:Bacterial growth en.svg

See also

References