MathGroup Archive 1999

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

Search the Archive

Re: Not Plotting Vertical Assymptotes

  • To: mathgroup at
  • Subject: [mg18616] Re: [mg18542] Not Plotting Vertical Assymptotes
  • From: "Wolf, Hartmut" <hwolf at>
  • Date: Tue, 13 Jul 1999 01:01:36 -0400
  • Organization: debis Systemhaus
  • References: <>
  • Sender: owner-wri-mathgroup at

Hello Patrick

Patrick McLean schrieb:
> Anyone have any idea how to stop Plot putting a (near) vertical line at
> x=2 in the command:
>       Plot[1/(1-x),{x,0,2}]
> ie. detect that the function 1/(1-x) has a singularity at x=2 and do
> something about it. This is analagous to numerically integrating over a
> (integrable) singularity, where the following remedy works:
>       NIntegrate[1/Abs[Sqrt[x-1]]^2,{x,0,1,2}]
> But in this case it doesn't work. Decreasing MaxBend works a bit but the
> line is still there.
Perhaps there is a better method, but a quick fix would be:




maybe that helps a little bit (Of course you could forge the idea to a
real program) ....

....ok, e.g. like that:

In[31]:= Unprotect[Plot]

In[32]:=  Plot[f_,{var_Symbol,min_,sing__,max_},opts___]:=
	Module[{ranges=Prepend[#,var]&/@Partition[{min,sing,max},2,1], g},

In[33]:= Protect[Plot]

In[34]:= Plot[1/((1-x)(2-x)),{x,0,1,2,3},PlotRange->{All,{-50,50}}]

---your's hw

  • Prev by Date: Re: trouble with greek letter output to EPS
  • Next by Date: Re: Manipulating differential equations
  • Previous by thread: Not Plotting Vertical Assymptotes
  • Next by thread: Re: Not Plotting Vertical Assymptotes