Re: change the base of the Log[] used by LogLogPlot?
- To: mathgroup at smc.vnet.net
- Subject: [mg112946] Re: change the base of the Log[] used by LogLogPlot?
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Thu, 7 Oct 2010 03:36:41 -0400 (EDT)
On 10/6/2010 9:15 AM, Brett Champion wrote: > 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 > 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