Jump to content

Semi-log plot: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
mNo edit summary
 
(43 intermediate revisions by 33 users not shown)
Line 1: Line 1:
{{short description|Type of graph}}
[[Image:LogLinScale.svg|thumb|200px|right|The '''log-lin''' type of a '''semi-log''' graph, defined by a [[logarithmic scale]] on the ''y''-axis, and a [[linear]] scale on the ''x''-axis. Plotted lines are: ''y''&nbsp;=&nbsp;10<sup>''x''</sup>&nbsp;(red), ''y''&nbsp;=&nbsp;''x''&nbsp;(green), ''y''&nbsp;=&nbsp;log(''x'')&nbsp;(blue).]]
[[Image:LinLogScale.svg|thumb|200px|right|The '''lin-log''' type of a '''semi-log''' graph, defined by a [[logarithmic scale]] on the x axis, and a [[linear]] scale on the y axis. Plotted lines are: ''y''&nbsp;=&nbsp;10<sup>''x''</sup>&nbsp;(red), ''y''&nbsp;=&nbsp;''x'' (green), ''y''&nbsp;=&nbsp;log(''x'')&nbsp;(blue).]]
[[File:LogLinScale.svg|thumb|200px|right|The log–linear type of a semi-log graph, defined by a [[logarithmic scale]] on the ''y''-axis (vertical), and a [[linear]] scale on the ''x''-axis (horizontal). Plotted lines are: ''y''&nbsp;=&nbsp;10<sup>''x''</sup>&nbsp;(red), ''y''&nbsp;=&nbsp;''x''&nbsp;(green), ''y''&nbsp;=&nbsp;log(''x'')&nbsp;(blue).]]
[[File:LinLogScale.svg|thumb|200px|right|The linear–log type of a semi-log graph, defined by a [[logarithmic scale]] on the x axis, and a [[linear]] scale on the y axis. Plotted lines are: ''y''&nbsp;=&nbsp;10<sup>''x''</sup>&nbsp;(red), ''y''&nbsp;=&nbsp;''x'' (green), ''y''&nbsp;=&nbsp;log(''x'')&nbsp;(blue).]]
In [[science]] and [[engineering]], a '''semi-log graph''' or '''semi-log plot''' is a way of visualizing data that are related according to an [[exponential curve|exponential]] relationship. One axis is plotted on a [[logarithmic scale]].
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 curve|exponential]] relationships, where one [[variable (mathematics)|variable]] covers a large range of values.<ref>(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}}<br />(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}}</ref>

This kind of plotting method is useful when one of the [[variable (mathematics)|variable]]s being plotted covers a large range of values and the other has only a restricted range – the advantage being that it can bring out features in the data that would not easily be seen if both variables had been plotted linearly.<ref>[http://www.intmath.com/Exponential-logarithmic-functions/7_Graphs-log-semilog.php M. Bourne ''Graphs on Logarithmic and Semi-Logarithmic Paper'' (www.intmath.com)]</ref>

The quote “[[logarithmic plot]]s are a device of the [[devil]]” is attributed to the seismologist [[Charles Richter]].<ref>{{cite web|url=http://neic.cr.usgs.gov/neis/seismology/people/int_richter.html|archive-url=https://web.archive.org/web/20120308041816/http://neic.cr.usgs.gov/neis/seismology/people/int_richter.html|archive-date=2012-03-08|first=Henry |last=Spall|title= Charles F. Richter - An Interview|date=1980}}</ref>


All equations of the form <math>y=\lambda a^{\gamma x}</math> form straight lines when plotted semi-logarithmically, since taking logs of both sides gives
All equations of the form <math>y=\lambda a^{\gamma x}</math> form straight lines when plotted semi-logarithmically, since taking logs of both sides gives
Line 11: Line 8:
:<math>\log_a y = \gamma x + \log_a \lambda. </math>
:<math>\log_a y = \gamma x + \log_a \lambda. </math>


This can easily be seen as a line in slope-intercept form with <math>\gamma</math> as the slope and <math>\log_a \lambda</math> as the vertical intercept. To facilitate use with logarithmic tables, one usually takes logs to base 10 or e, or sometimes base 2:
This is a line with slope <math>\gamma</math> and <math>\log_a \lambda</math> vertical intercept. The logarithmic scale is usually labeled in base 10; occasionally in base 2:


:<math>\log (y) = (\gamma \log (a)) x + \log (\lambda).</math>
:<math>\log (y) = (\gamma \log (a)) x + \log (\lambda).</math>


The term '''log-lin''' is used to describe a semi-log plot with a logarithmic scale on the ''y''-axis, and a [[linear]] scale on the ''x''-axis. Likewise, a '''lin-log''' plot uses a logarithmic scale on the ''x''-axis, and a [[linear]] scale on the ''y''-axis. Note that the naming is ''output-input'' (''y''-''x''), the opposite order from (''x'', ''y'').
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'' (''y''''x''), 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

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

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

:<math> \log_{n}(F(x)) = mx + b </math>
:<math> F(x) = n^{mx + b} = (n^{mx})(n^b). </math>

=== Finding the function from the semi–log plot ===

==== Linear–log plot ====

On a linear–log plot, pick some ''fixed point'' (''x''<sub>0</sub>, ''F''<sub>0</sub>), where ''F''<sub>0</sub> is shorthand for ''F''(''x''<sub>0</sub>), somewhere on the straight line in the above graph, and further some other ''arbitrary point'' (''x''<sub>1</sub>, ''F''<sub>1</sub>) on the same graph. The slope formula of the plot is:

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

which leads to

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

or

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

which means that
<math display="block">F(x) = m \log_n (x) + \mathrm{constant} </math>

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 (''F''<sub>0</sub>,&nbsp;''x''<sub>0</sub>) and (''F''<sub>1</sub>,&nbsp;''x''<sub>1</sub>) will have the function:

: <math> 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</math>

==== log–linear plot ====
On a log–linear plot (logarithmic scale on the y-axis), pick some ''fixed point'' (''x''<sub>0</sub>, ''F''<sub>0</sub>), where ''F''<sub>0</sub> is shorthand for ''F''(''x''<sub>0</sub>), somewhere on the straight line in the above graph, and further some other ''arbitrary point'' (''x''<sub>1</sub>, ''F''<sub>1</sub>) on the same graph. The slope formula of the plot is:

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

which leads to

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

Notice that ''n''<sup>log<sub>''n''</sub>(''F''<sub>1</sub>)</sup> = ''F''<sub>1</sub>. Therefore, the logs can be inverted to find:

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


or
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 lin-lin scales. A [[log-log plot]] uses the logarithmic scale for both axes, and hence is not a semi-log plot.


: <math>F_1 = F_0n^{m(x_1 - x_0)} </math>
==Equations==
The equation for a line with an [[ordinate]] axis logarithmically scaled would be:


This can be generalized for any point, instead of just ''F<sub>1</sub>'':
:<math> \log_{10}(F(x)) = mx + b </math>
:<math> F(x) = 10^{mx + b} = (10^{mx})(10^b). </math>


: <math> F(x) = {F_0} n^{\left(\frac {x-x_0}{x_1-x_0}\right) \log_n (F_1 / F_0)} </math>
The equation of a line on a plot where the [[abscissa]] axis is scaled logarithmically would be


== Real-world examples ==
:<math> F(x) = m \log_{10}(x) + b. \, </math>
=== Phase diagram of water ===
In [[physics]] and [[chemistry]], a plot of logarithm of pressure against temperature can be used to illustrate the various [[phase (matter)#Number of phases|phases]] of a substance, as in the following for [[water]]:
[[File:Phase diagram of water.svg|thumb|none|500px|log–linear pressure–temperature [[phase diagram]] of water. The [[Roman numeral]]s indicate various [[Ice#Phases|ice phases]].]]


=== 2009 "swine flu" progression ===
==Real-world examples==
While ten is the most common [[base (exponentiation)|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.}}
===Phase diagram of water===
In [[physics]] and [[chemistry]], a plot of logarithm of pressure against temperature can be used to illustrate the various [[phase_(matter)#Number_of_phases|phases]] of a substance, as in the following for [[water]]:
[[Image:Phase_diagram_of_water.svg|thumb|none|500px|Log-lin pressure–temperature [[phase diagram]] of water. The [[Roman numeral]]s indicate various [[Ice#Phases|ice phases]].]]


[[File:Influenza-2009-cases-logarithmic.png|thumb|none|500px|A semi-logarithmic plot of cases and deaths in the [[2009 outbreak of influenza A (H1N1)]].]]
===2009 "swine flu" progression===
While ten is the most common [[base (exponentiation)|base]], there are times when other bases are more appropriate, as in this example:


[[File:Influenza-2009-cases-logarithmic.png|thumb|none|500px|A semi-logarithmic plot of cases and deaths in the [[2009 outbreak of influenza A (H1N1)]]. 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.]]
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===
=== 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.
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.


[[image:Bacterial growth en.svg|thumb|none|500px|Bacterial growth curve]]
[[File:Bacterial growth en.svg|thumb|none|500px|Bacterial growth curve]]


==See also==
== See also ==
* [[Nomograph]], more complicated graphs
* [[Nomograph]], more complicated graphs
* [[Nonlinear regression#Transformation]], for converting a nonlinear form to a semi-log form amenable to non-iterative calculation
* [[Nonlinear regression#Transformation]], for converting a nonlinear form to a semi-log form amenable to non-iterative calculation
* [[Log–log plot]]


==References==
== References ==
{{reflist}}
{{reflist}}


Line 54: Line 98:
[[Category:Technical drawing]]
[[Category:Technical drawing]]
[[Category:Statistical charts and diagrams]]
[[Category:Statistical charts and diagrams]]
[[Category:Non-Newtonian calculus]]

Latest revision as of 21:44, 8 May 2024

The log–linear type of a semi-log graph, defined by a logarithmic scale 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).
The linear–log type of a semi-log graph, defined by a logarithmic scale 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]

All equations of the form form straight lines when plotted semi-logarithmically, since taking logs of both sides gives

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

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

[edit]

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

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

Finding the function from the semi–log plot

[edit]

Linear–log plot

[edit]

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:

which leads to

or

which means that

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:

log–linear plot

[edit]

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:

which leads to

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

or

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

Real-world examples

[edit]

Phase diagram of water

[edit]

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:

log–linear pressure–temperature phase diagram of water. The Roman numerals indicate various ice phases.

2009 "swine flu" progression

[edit]

While ten is the most common base, there are times when other bases are more appropriate, as in this example:[further explanation needed]

A semi-logarithmic plot of cases and deaths in the 2009 outbreak of influenza A (H1N1).

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

[edit]

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.

Bacterial growth curve

See also

[edit]

References

[edit]
  1. ^ (1) Bourne, M. "Graphs on Logarithmic and Semi-Logarithmic Paper". Interactive Mathematics. www.intmath.com. Archived from the original on August 6, 2021. Retrieved October 26, 2021.
    (2) Bourne, Murray (January 25, 2007). "Interesting semi-logarithmic graph – YouTube Traffic Rank". SquareCirclez: The IntMath blog. www.intmath.com. Archived from the original on February 26, 2021. Retrieved October 26, 2021.