# I Semi-log and log-log graphs

#### fog37

Hello,
Given two sets of data, $x$ and $y$, let's assume that the variable $y$ has a range of values that is much larger (or much smaller) than the range of $x$.
It becomes then preferable to convert the $y$ variable's values to its logarithmic value and obtain a semi-log graph by plotting $log(y)$ vs $x$. But why don't we simply plot the actual values of the variable $y$ with the distance between the marks on the y-axis representing a large value? The mark distance on the y and x axes does not have to be the same since the $x$ and $y$ variables can indicate different physical quantities...

Also, there seems to be no problem graphing an exponential function $y=e^{x}$.

And when would a log-log graph be useful?

Thanks!

#### jedishrfu

Mentor
When your x,y data pairs range from very small to very large then a log-log graph makes sense.

#### Mark44

Mentor
It becomes then preferable to convert the y variable's values to its logarithmic value and obtain a semi-log graph by plotting log(y) vs x. But why don't we simply plot the actual values of the variable y with the distance between the marks on the y-axis representing a large value? The mark distance on the y and x axes does not have to be the same since the x and y variables can indicate different physical quantities...
Sure, you can use a different scale on the x- and y-axes. The thing is that for an exponential function, a small change in x can produce a wildly varying change in y, depending on the value of x.

Here's a table of a few values for $y = 10^x$
Code:
x     y
0     1
1     10
2     100
3     1000
4     10000
If the scale on the y-axis is 1000 per scale mark, you lose detail for the smaller values of x, and your graph quickly runs out of room for the larger x values.
OTOH, if you use a log scale on the vertical axis, you are essentially compressing the y-values, and the graph becomes a straight line. This is also another advantage of plotting x vs $\log(x)$, especially if you just have data and don't know the underlying function -- if you end up with a graph that is linear, you know that the relationship between x and y is exponential.

Last edited:

#### fog37

Thanks for the example, Mark44.

So, if the y-axis marks were located at y=0, y=1000, y=2000, y=3000, etc. the graph would look perfectly ok for values of $x>3$. However for $x>>3$, the y-variables would assume values so large that the y-marks distance of 1000 would be too small and we would run out of space...

For $x<3$, the smaller y values would get all bunched up and the graph look strange...

#### Mark44

Mentor
Thanks for the example, Mark44.

So, if the y-axis marks were located at y=0, y=1000, y=2000, y=3000, etc. the graph would look perfectly ok for values of $x>3$. However for $x>>3$, the y-variables would assume values so large that the y-marks distance of 1000 would be too small and we would run out of space...

For $x<3$, the smaller y values would get all bunched up and the graph look strange...
Yes, that's exactly it.

"Semi-log and log-log graphs"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving