1
$\begingroup$

people :)

i have this graph in Mathematica

Help change Log base in this LogLog graph

the function mumas[y] its defined by

mumas[y_] := 1/2 + (2 y + 2)/(2 y (y^2 + 4)^2)

My problem is, according the manual of Mathematica, Mathematica uses Log[y] to denote the function $\ln(y)$, the Logarithm base $e$ , so im afraid that LogLogPlot[mumas[y],...] is actually a graph $\ln\mu$ vs. $\ln y$, so my question is how can change the Log base so the graph is in the base I needed. I hope I was clear in specifying the problem.

Thanks in advance for any help

$\endgroup$
1
  • 3
    $\begingroup$ The difference between Log and Log10 is just a constant factor. This together with the fact that the axis still shows the original numbers (just scaled) means that it doesn't matter which logarithm is used - the plott will always look the same $\endgroup$
    – Lukas Lang
    Sep 7, 2017 at 22:22

1 Answer 1

6
$\begingroup$

TL;DR

The base of the logarithm doesn't matter in log-plots or log-log-plots.

Explanation

As noted in my comment, there is no difference between the two since

$$\log_{10}x=\frac{\log x}{\log 10},$$

i.e. they differ by a factor, namely $\log 10$. This factor doesn't do anything as the axes are labeled using the original coordinates, not their logarithms. (The factor just scales both axes, but this is irrelevant)

To demonstrate:

μ[y_] := 1/2 + (2 y + 2)/(2 y (y^2 + 4)^2)
Plot[μ[y], {y, 0.05, 3}, Frame -> True, PlotRange -> All,
     ScalingFunctions -> {"Log", "Log"}]
Plot[μ[y], {y, 0.05, 3}, Frame -> True, PlotRange -> All,
     ScalingFunctions -> {"Log10", "Log10"}]

gives the following two plots:

log-log plot comparison

As you can see, everything is the same.

$\endgroup$
3
  • 1
    $\begingroup$ In short: you only need to worry about the base for a semilog plot. On a log-log plot, the base doesn't matter. $\endgroup$ Sep 8, 2017 at 0:25
  • $\begingroup$ @J.M. The base is also irrelevant for the semilog plot - only one axis is scaled, but since the aspect ratio of the plot is fixed, this doesn't do anything. (Also, thanks for prettifying my answer - is there any reason to reorder the options besides readability?) $\endgroup$
    – Lukas Lang
    Sep 8, 2017 at 8:27
  • $\begingroup$ Well, of course the options of a function can be in any order, by design. But it looks nice when they're alphabetized. $\endgroup$ Sep 8, 2017 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.