Re: Is there a Bug in Plot function ?
- To: mathgroup at smc.vnet.net
- Subject: [mg5131] Re: Is there a Bug in Plot function ?
- From: "Christopher R. Carlen" <crobc at epix.net>
- Date: Wed, 6 Nov 1996 01:32:49 -0500
- Organization: epix.net
- Sender: owner-wri-mathgroup at wolfram.com
In Article<556ocr$nac at dragonfly.wolfram.com>, <crobc at epix.net>
writes:
> 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 epix.net (please send mail here)
carlenC at cs.moravian.edu