Re: ContourPlot non rectangular evaluation?
- To: mathgroup at smc.vnet.net
- Subject: [mg127851] Re: ContourPlot non rectangular evaluation?
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Sun, 26 Aug 2012 23:35:19 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <20120825082641.60C04689F@smc.vnet.net> <20120826065022.F1C976866@smc.vnet.net>
The O.P. wanted to exclude the region *below* the curve g([x, y] == 0. On Aug 26, 2012, at 2:50 AM, Bob Hanlon <hanlonr357 at gmail.com> wrote: > Try the option Exclusions or using Boole > > f[x_, y_] = Sin[x + y]; > g[x_, y_] = x - y; > h[x_, y_] = f[x, y]/g[x, y]; > > ContourPlot[h[x, y], > {x, -Pi, Pi}, {y, -Pi, Pi}] // > Quiet > > ContourPlot[h[x, y], > {x, -Pi, Pi}, {y, -Pi, Pi}, > Exclusions -> {g[x, y] == 0}] // > Quiet > > ContourPlot[h[x, y]* > Boole[g[x, y] != 0], > {x, -Pi, Pi}, {y, -Pi, Pi}] // > Quiet > > > Bob Hanlon > > > On Sat, Aug 25, 2012 at 4:26 AM, Sam McDermott <samwell187 at gmail.com> wrote: >> Hi, >> >> I'd like to make a plot of level curves of a function, but this = function = > becomes singular and passes from infinity to negative infinity, which = reall= > y uglifies the plot. It is easy for me to identify where the function = becom= > es singular (i.e., when the denominator becomes 0!), but I'm having = trouble= > telling Mathematica to stop evaluating before then, because this = singulari= > ty is sensitive to both of the variables on the axes of my = ContourPlot. Is = > there a simple way of telling Mathematica where to stop? >> >> In other words, I have some function >> >> h[x_,y_]:=f[x,y]/g[x,y] >> >> and I can numerically find the zeroes of g[x,y]. Can I make a = ContourPlot= > such that >> >> ContourPlot[h[x,y],{x,xmin,xmax},{y,ymin,ymax}] >> >> does not evaluate below the curve >> >> g[x,y]=0 >> >> ? >> >> I think I'm basically looking for some way of setting assumptions of = eval= > uating an "If" conditional inside of ContourPlot but can't find a good = way = > of doing it. Any help would be much appreciated! >> >> Thanks very much for your time! >> >> -Sam >> --- Murray Eisenberg = murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
- References:
- ContourPlot non rectangular evaluation?
- From: Sam McDermott <samwell187@gmail.com>
- Re: ContourPlot non rectangular evaluation?
- From: Bob Hanlon <hanlonr357@gmail.com>
- ContourPlot non rectangular evaluation?