I want to use LogLogPlot, say as in LogLogPlot[x,{x,.1,1}], but I want
the Log to be in base 10, not in base e as the default used.
Looking at the doc, I can't see it. No option to change the base.
I can ofcourse build my own data, and use ListPlot, but LogLogPlot
handles the ticks better automatically and it samples better. Same
question applies for LogPlot, LogLinearPlot, ListLogPlot,
ListLogLinearPlot, etc...
I am sure this is hidden somewhere in the documentation :)
Version 7.0
thanks,
--Nasser
LogLogPlot sets up axes as log base 10. I don't know where you've
learned that it's base e, but it's not true.
However, If you are going to plot additional graphics, e.g. by using
Epilog, you will notice that those coordinates have to be log base e
to arrive at the desired location. For example:
LogLogPlot[x, {x, .1, 1}, Epilog -> Point[{Log[E, 0.5], Log[E, 0.5]}]]
Cheers -- Sjoerd
> Nope. LogPlot uses Log.
>
> I'm curious as to why you want to switch to Log10 since the plot would
> end up looking exactly the same.
>
hi;
If both the x and y are in log scale, yes, the look the same (but ticks
are not for all the bases).
---- loglog-------
x = {1, 2, 3, 4};
data1 = Table[{Log[10,x], Log[10, x]}, {x, 1, 10}];
data2 = Table[{Log[x], Log[x]}, {x, 1, 10}];
Show[{ListPlot[data1, PlotStyle -> Red, Joined -> True],
ListPlot[data2, Joined -> True]}]
---------------
But not if x is linear and y is log, then the plot are not the same:
----loglinear-------
x = {1, 2, 3, 4};
data1 = Table[{x, Log[10, x]}, {x, 1, 10}];
data2 = Table[{x, Log[x]}, {x, 1, 10}];
Show[{ListPlot[data1, PlotStyle -> Red, Joined -> True],
ListPlot[data2, Joined -> True]}]
---------------------
any way, not too important, just was wondering ;)
thanks,
--Nasser
> Mathematica experts:
>
> I want to use LogLogPlot, say as in LogLogPlot[x,{x,.1,1}], but I want
> the Log to be in base 10, not in base e as the default used.
>
> Looking at the doc, I can't see it. No option to change the base.
>
> I can ofcourse build my own data, and use ListPlot, but LogLogPlot
> handles the ticks better automatically and it samples better. Same
> question applies for LogPlot, LogLinearPlot, ListLogPlot,
> ListLogLinearPlot, etc...
>
> I am sure this is hidden somewhere in the documentation :)
>
Nope. LogPlot uses Log.
I'm curious as to why you want to switch to Log10 since the plot would
end up looking exactly the same.
Brett Champion
Wolfram Research
> On 10/6/2010 8:29 AM, Brett Champion wrote:
> But not if x is linear and y is log, then the plot are not the same:
>
> ----loglinear-------
> x = {1, 2, 3, 4};
> data1 = Table[{x, Log[10, x]}, {x, 1, 10}];
> data2 = Table[{x, Log[x]}, {x, 1, 10}];
> Show[{ListPlot[data1, PlotStyle -> Red, Joined -> True],
> ListPlot[data2, Joined -> True]}]
> ---------------------
>
> any way, not too important, just was wondering ;)
My point is that these look the same:
{ListPlot[data1, PlotStyle -> Red, Joined -> True],
ListPlot[data2, Joined -> True]}
(ignoring the ticks which get adjusted anyway.)
Brett Champion
Wolfram Research
When you say "these", you seem to have used the loglog version. Yes.
But when x is linear, and y is log (like Mathematica LogPlot), then
different bases used for the log make a different looking plots. (how
can y=log(10,x) = log(x) ?), different y values for same x value result:
Please see screen shot.
http://12000.org/tmp/oct62010/Untitled.png
For the loglog, yes, becuase both are scaled same way. But then have to
adjust ticks.
Thanks,
--Nasser
Partition[Plot[Log[#, x], {x, .1, 1},
Frame -> True, Axes -> False,
Epilog ->
Text[Style["base = " <> ToString[#], 14],
{.7, Log[#, .2]}]] & /@
{E, Pi, 10, RandomReal[{2, 500}]},
2] //
Grid
Bob Hanlon
---- "Nasser M. Abbasi" <n...@12000.org> wrote:
=============
Mathematica experts:
I want to use LogLogPlot, say as in LogLogPlot[x,{x,.1,1}], but I want
the Log to be in base 10, not in base e as the default used.
Looking at the doc, I can't see it. No option to change the base.
I can ofcourse build my own data, and use ListPlot, but LogLogPlot
handles the ticks better automatically and it samples better. Same
question applies for LogPlot, LogLinearPlot, ListLogPlot,
ListLogLinearPlot, etc...
I am sure this is hidden somewhere in the documentation :)
Version 7.0
thanks,
--Nasser