Re: No Show

• To: mathgroup at smc.vnet.net
• Subject: [mg89122] Re: No Show
• From: "David Park" <djmpark at comcast.net>
• Date: Mon, 26 May 2008 01:31:24 -0400 (EDT)
• References: <g1bf08\$mcv\$1@smc.vnet.net>

```It's because of the strange way that Show picks up plot options. It's
picking up the PlotRange (and I also think the actual BoxRatios) from the
first top Plot3D. So you can solve the problem by supplying the correct
option values in the Show statement.

bot = Plot3D[-Sqrt[1 - (x^2 + y^2)], {x, -1, 1}, {y, -1, 1}];
top = Plot3D[+Sqrt[1 - (x^2 + y^2)], {x, -1, 1}, {y, -1, 1}];

Show[top, bot,
PlotRange -> {-1, 1},
BoxRatios -> 1]

Or, in this case, you could actually combine the two surfaces in one Plot3D
statement.

Plot3D[{-Sqrt[1 - (x^2 + y^2)], Sqrt[1 - (x^2 + y^2)]}, {x, -1, 1}, {y, -1,
1}, BoxRatios -> 1]

With the Presentations package there is a cleaner separation between options
that affect the drawing of the graphical objects and the options that
control the overall appearance of the plot. The problem does not occur there
so the following works as expected.

Needs["Presentations`Master`"]

Draw3DItems[
{Draw3D[-Sqrt[1 - (x^2 + y^2)], {x, -1, 1}, {y, -1, 1}],
Draw3D[Sqrt[1 - (x^2 + y^2)], {x, -1, 1}, {y, -1, 1}]},
Axes -> True]

Also, PlotRange is an option that affects both the drawing of a graphical
object AND the overall appearance of a plot. Sometimes it has to appear in
both places. For example, if you are combining a 2D contour plot with other
elements you may need a z-range in the contour plot, but certainly not in
the overall plot.

--
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/

"Narasimham" <mathma18 at hotmail.com> wrote in message
news:g1bf08\$mcv\$1 at smc.vnet.net...
> Why is the following plot, bot, (with - Sqrt) not Shown along with
> top?
>
> Why is it treated only as a plot skeleton, so no combining is
> possible?
>
> bot = Plot3D[-Sqrt[1 - (x^2 + y^2) ] , {x, -1, 1}, {y, -1, 1}]
> top = Plot3D[+Sqrt[1 - (x^2 + y^2) ] , {x, -1, 1}, {y, -1, 1}]
> Show[top, bot]
>
> TIA
> Narasimham
>

```

• Prev by Date: Re: Bug in Mathematica or my mistake?
• Next by Date: Re: Re: Solve's Strange Output
• Previous by thread: Re: No Show
• Next by thread: Re: No Show