Re: plot variance(s)

*To*: mathgroup at smc.vnet.net*Subject*: [mg51775] Re: plot variance(s)*From*: Bill Rowe <readnewsciv at earthlink.net>*Date*: Mon, 1 Nov 2004 02:53:41 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

On 10/31/04 at 1:17 AM, slshippee at comcast.net (Steven Shippee) wrote: >Input1: data = Table[Sin[x], {x, 0, 2\[Pi]}]; >Input 2: p1 = ListPlot[data, PlotStyle -> {Red, PointSize[0.03]}, >DisplayFunction -> Identity]; >Input 3: p2 = Plot[Sin[x], {x, 0, 2\[Pi]}, DisplayFunction -> >Identity]; >Input 4: Show[p1, p2, DisplayFunction -> $DisplayFunction]; >Why doesn't p2 directly overlay the dots in p1? Thanks in advance, Because you did not retain the x value in your variable data. With out retaining the x value, ListPlot assumes a starting value of 1 not 0. The result is you are plotting Sin[x-1] with ListPlot and Sin[x] with Plot -- To reply via email subtract one hundred and four