RE: Plot[x Sin[x],{-100,100}] Bad {-100,99} Good?
- To: mathgroup at smc.vnet.net
- Subject: [mg38311] RE: [mg38268] Plot[x Sin[x],{-100,100}] Bad {-100,99} Good?
- From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>
- Date: Thu, 12 Dec 2002 01:32:15 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Steven, observe: In[2]:= Options[Plot, PlotPoints] Out[2]= {PlotPoints -> 25} As you used the default, 25 plot points are not only not enough to reasonably display the rapidly oscillating function, they are also too few starting points for the adaptive sampling algorithm. Just increase, e.g. Plot[x Sin[x], {x, -100, 100}, PlotPoints -> 333] is quite pleasing to the eye, even if enlarged. -- Hartmut Wolf >-----Original Message----- >From: Steven T. Hatton [mailto:hattons at globalsymmetry.com] To: mathgroup at smc.vnet.net >Sent: Tuesday, December 10, 2002 10:13 AM >To: mathgroup at smc.vnet.net >Subject: [mg38311] [mg38268] Plot[x Sin[x],{-100,100}] Bad {-100,99} Good? > > >This is Mathematica 4.2 on Linux. I evaluated Plot[x Sin[x], >{-100,100}] and >disvovered that the portion of the plot between,9.5Pi and 11Pi >is displayed >as a line segment joining the points {9.5 , 9.5 Sin[9.5]} and {11 , 11 >Sin[11]}. I've also found that the plot from x=-100 to >x=99.99 is incorrect. >The plot over the range [-100,99] is correct. What is >happening here? Does >this happen on other systems? >-- >STH >Hatton's Law: >"There is only One inviolable Law." > >