MathGroup Archive 1995

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

Search the Archive

Plotting Piecewise Functions with Discontinuites


I'm trying to plot a piecewise function with a discontinuity at x=3:

f[x_]:=Which[x<=-3,3,
	     x>=-3 && x<=3, Abs[x],
	     x>3,-3]
Plot[f[x],{x,-7,7},AxesLabel->{x,y},PlotRange->All];

Mathematica draws a veritcal line connecting the points of discontinuity.
Is there a "simple way" to get Mathematica to not evaluate the function 
exactly at the point of discontinuity besides using Show[ ] with two 
separate plots?

Thanks in Advance.
Capt Paul Simonich
Dept of Mathematical Sciences
US Air Force Academy





  • Prev by Date: Re: question about nest
  • Next by Date: Re: ListPlot3D and Its Axes
  • Previous by thread: molecular structures
  • Next by thread: Re: Plotting Piecewise Functions with Discontinuites