MathGroup Archive 2002

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

Search the Archive

Re: Mathematica 4.2 & Strange Plot results

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36307] Re: [mg36292] Mathematica 4.2 & Strange Plot results
  • From: BobHanlon at aol.com
  • Date: Sat, 31 Aug 2002 01:25:49 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 8/30/02 1:44:16 AM, someone at somewhere.com writes:


> I would expect that
>
> Plot[Sin[x]/Sin[x], {x, -2.5, -1.5}]
>
> would produce a horizontal line at y=1.
>
> However, on my Windows XP computer it produces a graph where the y value is
> less than 1 at several points. Most notibly between x=-1.6 and x=-1.8
>
> Is this just an isolated case? Or does it happen to others? If so - why?
>

$Version


4.1 for Mac OS X (November 5, 2001)


p = Plot[Sin[x]/Sin[x],{x,-2.5,-1.5}];


Note that the Ticks on the y-axis are all 1, that is, in trying to find
something
of interest the adaptive range has zoomed in and is looking at the machine
precision representations of 1.


(First /@(Ticks /. AbsoluteOptions[p])[[2]])//InputForm


Zoom out using the PlotRange


Plot[Sin[x]/Sin[x],{x,-2.5,-1.5}, PlotRange->{-0.1,2.1}];


Or as stated in the on-line help for Plot: "You should use Evaluate to evaluate
the function to be plotted if this can safely be done before specific numerical
values are supplied".


Plot[Evaluate[Sin[x]/Sin[x]],{x,-2.5,-1.5}];


Bob Hanlon
Chantilly, VA   USA


  • Prev by Date: L2 inner product. Integrate and Conjugate?
  • Next by Date: Re: Using a Named Pattern in a Rule
  • Previous by thread: Re: Mathematica 4.2 & Strange Plot results
  • Next by thread: Re: Mathematica 4.2 & Strange Plot results