MathGroup Archive 1998

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

Search the Archive

Re: Plotting w/o artifacts at discontinuities


  • To: mathgroup@smc.vnet.net
  • Subject: [mg12381] Re: Plotting w/o artifacts at discontinuities
  • From: dreissNOSPAM@nospam.earthlink.net (David Reiss)
  • Date: Sun, 10 May 1998 02:05:03 -0400
  • Organization: EarthLink Network, Inc.
  • References: <6hpeed$dck@smc.vnet.net> <6ibrji$t5c@smc.vnet.net>

There is a recent submission to MathSource that takes a look at the
question of plotting funcitons with discontinuities. It is located at:
http://www.mathsource.com/cgi-bin/MathSource/WhatsNew/0209-382 and is
titled "Ploting 2D Real Functions with Discontinuities" This item is
written in Spanish, but is relatively easy to follow  even if you are
not a reader of Spanish.


In article <6ibrji$t5c@smc.vnet.net>, Allan Hayes
<hay@haystack.demon.co.uk> wrote:

> Bruce Cohen %FEC wrote:
> > 
> > I would like to be able to get plots that do not have artifacts from
> > discontinuities without having to know where the problem[s] will be in
> > advance.
> > 
> > For example, I would like to be able to say
> >         Plot[1/(1+x), {x,-2,1}]
> > and get a graph without the vertical line at x==-1.  Though
> >         p1=Plot[1/(1+x), {x,-2,-1}, DisplayFunction->Identity];
> >         p2=Plot[1/(1+x), {x,-1,1}, DisplayFunction->Identity];
> >         Show[p1,p2, DisplayFunction->$DisplayFunction]; does the trick, it
> > requires my anticipation of the problem at x==1.
> > 
> > Thanks.
> 
> Bruce,
> Here is a starter: we split the line where it becomes too steep. A lot
> more needs to be done to take account of things like the difference
> between perceived slope and calculated slope - and it would be useful
> to have the slope size that causes the split to be controled by an
> option.
> 
> plt=Plot[1/(1+x), {x,-2,1}]
> 
> Show[plt/.Line[lst_]:>
> Line/@Split[lst,Abs[Divide@@Reverse[#2-#1]]<10^4&]]
>                 
> 
> -- 
> Allan Hayes
> Training and Consulting
> Leicester, UK
> hay@haystack.demon.co.uk
> http://www.haystack.demon.co.uk
> voice: +44 (0)116 271 4198
> fax: +44 (0)116 271 8642

-- 
David Reiss
dreissNOSPAM@nospam.earthlink.net
http://home.earthlink.net/~dreiss
To send personal email, remove the words  "nospam" and "NOSPAM" from the
email address



  • Prev by Date: Re: Hyperlinks to htm files
  • Next by Date: Re: EPS printing problems
  • Prev by thread: Re: Plotting w/o artifacts at discontinuities
  • Next by thread: Re:Plotting w/o artifacts at discontinuities