Weird Plot problem
- To: mathgroup at smc.vnet.net
- Subject: [mg59762] Weird Plot problem
- From: "Owen, HL \(Hywel\)" <h.l.owen at dl.ac.uk>
- Date: Sat, 20 Aug 2005 03:13:56 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
- Thread-index: AcWkyUxYPb5lzbyTQJSWgTwWPwCBNw==
Hi folks,
I'm seeing a weird plot problem. For reference, I'm using Mathematica 5.2 on Windows XP.
First, using the package
<< Statistics`ContinuousDistributions`
I define a Gaussian function modulated with a Sin[] as:
ModulatedGaussian[x_, ì_, ó_, modamp_, modë_] := PDF[NormalDistribution[ì, ó],x](1 + modamp Sin[2 ð x/modë])
I then Plot it using:
Plot[ModulatedGaussian[x, 0.0, 1.0, 0.3, 0.2], {x, -5, 5}]
Instead of seeing the modulation properly, I see the plot available at:
http://www.astec.ac.uk/staff/owen/pictures/graph.png
Plot[ModulatedGaussian[x, 0.0, 1.0, 0.31, 0.2], {x, -5, 5}]
and Plot[ModulatedGaussian[x, 0.0, 1.0, 0.29, 0.2], {x, -5, 5}]
(changing the modulation amplitude) both work fine. Generating the data also works:
ListPlot[Table[{x,ModulatedGaussian[x, 0, 1, 0.3, 0.2]}, {x, -5, 5, 0.01}], PlotJoined -> True]
Anyone else get the same behaviour? Is it a bug?
Cheers,
Hywel
-------------------------------------------
Hywel Owen h.owen at dl.ac.uk
Accelerator Science and Technology Centre
CCLRC Daresbury Laboratory
United Kingdom
Tel/Fax: +44 1925 603797/603192
-------------------------------------------
"Errors using inadequate data are much less than those using no data at all."
-- Charles Babbage