       Plot3D problems: no plot in some cases

• To: mathgroup at smc.vnet.net
• Subject: [mg109601] Plot3D problems: no plot in some cases
• From: MathAddicted <filnen3001 at yahoo.it>
• Date: Fri, 7 May 2010 06:30:59 -0400 (EDT)

```Dear all!

I have found a strange behavior in Plot3D.
In some cases it doesn't plot anything even if it should.

In the example below, I want to plot a function in a region centered in (xP, yP).
The function is a two-dimensional gaussian.
But if the region is centered in (0,0) or in (50,50) the function is plotted.
While if it is centered in (20,20) it isn't plotted.
(Note that Plot3D computes correct values for the PlotRange, in any case (seen using AbsoluteOptions[]))

Does anybody know why?
Is there any option to use?
Or could it be a bug?

Thanks!

(**************************************************)
(*problems with Plot3D*)
(*in some cases Plot3D doesn't plot anyting!*)
Clear["Global`*"];
f[x_, y_] = Exp[-(x^2 + y^2)]
range = 10;
(*try these values for xP,yP*)
(*0,0:ok!*)
(*20,20:NO PLOT!!!!!!!*)
(*50,50:ok!*)
xP = 20;
yP = 20;
(*values in some points in the range*)
N[f[xP, yP]]
N[f[xP - range/2, yP - range/2]]

(*this is just to see that Plot3D found the right plot range*)
AbsoluteOptions[
Plot3D[f[x, y], {x, xP - range/2, xP + range/2}, {y, yP - range/2,
yP + range/2}, PlotRange -> All], PlotRange]

(*plot!*)
Plot3D[f[x, y], {x, xP - range/2, xP + range/2}, {y, yP - range/2,
yP + range/2}, PlotRange -> All]

(**************************************************)

```

• Prev by Date: RuleDelayed for parsing XML with multiple children
• Next by Date: Re: Return intermediate reference using Hold*****?
• Previous by thread: Re: RuleDelayed for parsing XML with multiple children
• Next by thread: 2D phase unwrapping