MathGroup Archive 2001

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

Search the Archive

RE: Log plots: plot points *linearly* equidistant

  • To: mathgroup at
  • Subject: [mg31627] RE: [mg31624] Log plots: plot points *linearly* equidistant
  • From: "David Park" <djmp at>
  • Date: Mon, 19 Nov 2001 03:11:07 -0500 (EST)
  • Sender: owner-wri-mathgroup at


The Log plots from Graphics`Graphics` present many difficulties in their
use. The easiest approach to making log plots is to do it yourself. However,
the LogScale Tick specification from Graphics`Graphics` is useful. The
logstep function below allows relatively even spacing of the points on a log
scale. Then you can use the regular Plot function.


logstep[f_][y_] := f[10^(y)]

f[x_] := UnitStep[x - 1]

Plot[logstep[f][y], {y, -2, 3},
    Ticks -> {LogScale, Automatic},
    AxesOrigin -> {-2, 0}];

David Park
djmp at

> From: Primoz Peterlin [mailto:primoz.peterlin at]
To: mathgroup at
> 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
> Tel: +386-1-5437632, fax: +386-1-4315127,

  • Prev by Date: Re: Problem with funktion with four variables
  • Next by Date: Re: making a e-funtion of two co√∂rdinates
  • Previous by thread: Log plots: plot points *linearly* equidistant
  • Next by thread: RE: Log plots: plot points *linearly* equidistant