Re: Plot3D?

• To: mathgroup at smc.vnet.net
• Subject: [mg34048] Re: Plot3D?
• From: "Allan Hayes" <hay at haystack.demon.co.uk>
• Date: Sun, 28 Apr 2002 03:46:43 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Plot3D will only plot one surface over a rectangular region, it store only
matrix of heights.

Four solutions:

1) Plot separately,  DisplayFunction\[Rule]Identity turns of the display.

g1 = Plot3D[x + y, {x, -5, 5}, {y, -5, 5},
DisplayFunction -> Identity];
g2 = Plot3D[x^2 + y^2, {x, -5, 5}, {y, -5, 5},
DisplayFunction -> Identity];

Show them together, DisplayFunction\[Rule]\$DisplayFunction turns the display
back on]

Show[g1, g2, DisplayFunction -> \$DisplayFunction]

2) Use Block to temporarity disable display:

Show[Block[{\$DisplayFunction = Identity},
{Plot3D[x + y, {x, -5, 5}, {y, -5, 5}],
Plot3D[x^2 + y^2, {x, -5, 5}, {y, -5, 5}]}]]

<< "Graphics`Graphics`"

Now we can use

DisplayTogether[Plot3D[x + y, {x, -5, 5}, {y, -5, 5}],
Plot3D[x^2 + y^2, {x, -5, 5}, {y, -5, 5}]]

4) use ParametricPlot3D and adjust shape of bounding box.

ParametricPlot3D[{{x, y, x + y}, {x, y, x^2 + y^2}},
{x, -5, 5}, {y, -5, 5}, BoxRatios -> {1, 1, 0.4}]

--
Allan

---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Rex_chaos" <rex_chaos at 21cn.com> wrote in message
> Hello all,
> I want to plot 2 3D graph in a same figure. However, the following
>   Plot3D[List[x + y, x^2 + y^2], {x, -5, 5}, {y, -5, 5}]
>
> How can I do that?
>
> Thanks
>

```

• Prev by Date: Inquery(Partial Differentiation)
• Next by Date: RE: Re: Dynamic referencing AND hyperlinking for numbered equations
• Previous by thread: RE: Plot3D?