MathGroup Archive 2004

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

Search the Archive

RE: How to plot...

  • To: mathgroup at
  • Subject: [mg46049] RE: [mg46030] How to plot...
  • From: "David Park" <djmp at>
  • Date: Tue, 3 Feb 2004 18:20:53 -0500 (EST)
  • Sender: owner-wri-mathgroup at


If this is a plotting problem, then I don't completely understand your
question. Because of the adaptive algorithim for picking points Mathematica
never actually hits the x = 0 case. But it gets so close that you can't tell
the difference.

Plot[Sin[x]/x, {x, 0, Pi},
    Frame -> True];

Even with a symmetrical domain Mathematica misses the x = 0 point.

Plot[Sin[x]/x, {x, -Pi, Pi},
    Frame -> True];

But if you calculate a set of points for making a ListPlot, then you can
make certain that it gets the x = 0 point. Now you need your special

f[x_] := Which[x == 0, 1, True, Sin[x]/x]

pts = Table[{x, f[x]}, {x, 0, Pi, Pi/24}];

ListPlot[pts, PlotJoined -> True,
    Frame -> True];

But this doesn't look any different than the first plot and loses the use of
Mathematica's adaptive algorithm.

If you want to specifically mark the x = 0 point, you could use...

Plot[Sin[x]/x, {x, 0, Pi},
    Frame -> True,
    Epilog -> {AbsolutePointSize[5], Point[{0, f[0]}]}];

David Park
djmp at

From: Oliver Kowalke [mailto:oliver.kowalke at]
To: mathgroup at


I want to plot sin(x)/x on x=0.

f3 := Which[x==0,1,0<x,Abs[Sin[x]/x]];

F3 ist defined on x=0 (analytische Fortsetzung).
How can I force mathematica to plot the graph on x=0?

  • Prev by Date: Re: RealDigits bug?
  • Next by Date: Conflict between Mathematica 4.1 and 5.01?
  • Previous by thread: Re: How to plot...
  • Next by thread: Re: How to plot...