MathGroup Archive 1996

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

Search the Archive

Re: Is there a Bug in Plot function ?

  • To: mathgroup at
  • Subject: [mg5131] Re: Is there a Bug in Plot function ?
  • From: "Christopher R. Carlen" <crobc at>
  • Date: Wed, 6 Nov 1996 01:32:49 -0500
  • Organization:
  • Sender: owner-wri-mathgroup at

In Article<556ocr$nac at>, <crobc at> 
> I plotted a rather simple function via:
> k = 1;
> dk = 0.1;
> W[x_] = 2 Cos[ 2 Pi ( dk/2 x ) ] Sin[ 2 Pi ( k x ) ]
> Plot[ W[x,0] , {x,-20,20}, PlotStyle->{Thickness[0.002]} ]
> and the resulting plot has severe problems, such as straight lines 
> connecting points on the curve where the sinusoidal cycles that 
> should have appeared simply were skipped.

OOps, I didn't try to plot W[x,0], but rather W[x] .

But that's not the problem.  I have increased the PlotPoints, and 
this does not reliably correct the problem.

What has worked, is to create a list of ordered pairs for the 
function evaluated over the desired domain, and broken into say, 500 
to 1000 points.  The resulting ListPlot produces a perfectly clean 
graph, but this is of course a rather cumbersome procedure.

Christopher R. Carlen
crobc at           (please send mail here)
carlenC at

  • Prev by Date: Break a List into Individual Elements?
  • Next by Date: Strange Behaviour of Limits[...]
  • Previous by thread: Re: Is there a Bug in Plot function ?
  • Next by thread: Re: Simplification of (a^2)*Sqrt[a^(-2)]