Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: change the base of the Log[] used by LogLogPlot?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112945] Re: change the base of the Log[] used by LogLogPlot?
  • From: Brett Champion <brettc at wolfram.com>
  • Date: Thu, 7 Oct 2010 03:36:30 -0400 (EDT)

On Oct 6, 2010, at 11:07 AM, Nasser M. Abbasi wrote:

> On 10/6/2010 8:29 AM, Brett Champion wrote:
>> On Oct 6, 2010, at 2:15 AM, Nasser M. Abbasi 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 :)
>>>
>>
>
>> 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.
>>
>
>
> 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


  • Prev by Date: Re: How to apply a list of functions
  • Next by Date: Re: change the base of the Log[] used by LogLogPlot?
  • Previous by thread: Re: change the base of the Log[] used by LogLogPlot?
  • Next by thread: Re: change the base of the Log[] used by LogLogPlot?