Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

RE: Log plots: plot points *linearly* equidistant

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31640] RE: [mg31624] Log plots: plot points *linearly* equidistant
  • From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.de>
  • Date: Fri, 23 Nov 2001 05:46:03 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

> -----Original Message-----
> From: Primoz Peterlin [mailto:primoz.peterlin at biofiz.mf.uni-lj.si]
To: mathgroup at smc.vnet.net
> Sent: Sunday, November 18, 2001 12:29 PM
> To: mathgroup at smc.vnet.net
> Subject: [mg31640] [mg31624] Log plots: plot points *linearly* equidistant
> 
> 
> Hello,
> 
> Browsing through the archives, I have seen this question coming up
> recurringly at least since 1995, but with no satisfactory answer...
> 
> The problem is that LogLinearPlot and LogLogPlot functions 
> evaluate plot
> points at values which are *linearly* equidistant on the x-axis, not
> logarithmically. Why this is erroneous can be seen on a 
> simple example:
> 
> Needs["Graphics`Graphics`"]
> LogLinearPlot[UnitStep[x - 1], {x, 0.01, 1000}]
> 
> As far as I know, there are two ways of avoiding this behaviour:
> 
> a) setting PlotDivision option to higher, often prohibitively high
> values,
> 
> b) evaluating one's own list of {x,} pairs and using LogLinearListPlot
> or LogLog
> ListPlot to plot it
> 
> The first solution is slow and inefficient, the second one is
> cumbersome. Has nobody so far been annoyed by the LogLinearPlot
> behaviour enough to actually rewrite it in a decent way? :)
> 
> With kind regards,
> Primoz 
> 
> -- 
> Primo¾ Peterlin,   In¹titut za biofiziko, Med. fakulteta, Univerza v
> Ljubljani
> Lipièeva 2, SI-1000 Ljubljana, Slovenija. 
> primoz.peterlin at biofiz.mf.uni-lj.si
> Tel: +386-1-5437632, fax: +386-1-4315127,
> http://sizif.mf.uni-lj.si/~peterlin/
> 

Hello Primoz,

(c) e.g.:

Plot[UnitStep[10^y - 1], {y, -2, 3}, Ticks -> {LogScale[-2, 3], Automatic}]

just replace your variable and range as expressend by the logarithms, and
set corresponding tick marks! Along this line you can easily write your own
version of LogLinearPlot; transforming the tick marks might be a bit tricky
to cover all cases. However, it is not neccessary to do so (and perhaps thus
has not been done).

Hartmut


  • Prev by Date: Re: Zero does not equal zero et al.
  • Next by Date: Re: Evaluate Initialization button?
  • Previous by thread: RE: Log plots: plot points *linearly* equidistant
  • Next by thread: Re: Log plots: plot points *linearly* equidistant