MathGroup Archive 1996

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

Search the Archive

Re: Is there a Bug in Plot function ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5125] Re: Is there a Bug in Plot function ?
  • From: haberndt at dnai.com (Harald Berndt)
  • Date: Wed, 30 Oct 1996 22:05:01 -0500
  • Organization: DNAI ( Direct Network Access )
  • Sender: owner-wri-mathgroup at wolfram.com

In article <556ocr$nac at dragonfly.wolfram.com>, "Christopher R. Carlen"
<crobc at epix.net> wrote:

> 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.
> [ .... cuts .... ]

This has to do with Mathematica's intelligent sampling algorithm. You need
to look at all options of Plot to find some useful ones. The most obvious
improvement for your situation is to increase PlotPoints, say

   PlotPoints-> 30

Try it, you'll like it!

-- 
Harald Berndt, Ph.D.                            Research Specialist,
Voice: 510-652-5974                                      Consultant
FAX:   510-215-4299


  • Prev by Date: arguments
  • Next by Date: Mma 2.2 on NeXTSTEP for Intel - Function Browser Q?
  • Previous by thread: Is there a Bug in Plot function ?
  • Next by thread: Removing In[] and Out[]