Re: Combining 2D graphs into a 3D graph
- To: mathgroup at smc.vnet.net
- Subject: [mg49408] Re: Combining 2D graphs into a 3D graph
- From: BobHanlon at aol.com
- Date: Sun, 18 Jul 2004 08:09:19 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Needs["Graphics`"];
lines={Line[{{2,7},{3,9}}],Line[{{2,6},{3,8}}]};
Module[{m=Length[lines],k=1},
Show[Graphics[
{Hue[((k++)+m-2)/(2m-2)],#}&/@lines],
Axes->True]];
Module[{m=Length[lines],k=1},
Show[StackGraphics[Graphics[
{Hue[((k++)+m-2)/(2m-2)],#}]&/@lines],
Axes->True, ViewPoint->{1.7, -2.8, 0.85}]];
Module[{m=Length[lines],k=0},
Show[Graphics3D[
{Hue[((++k)+m-2)/(2m-2)],
#/.{x_?NumericQ, y_?NumericQ}:>{x,k,y}}&/@lines],
Axes->True, AspectRatio->1,ImageSize->288]];
Bob Hanlon
> In a message dated Sat, 17 Jul 2004 11:13:58 +0000 (UTC),
> suomesta at yahoo.com writes: I have many curves in the 2D space, each associated with
> a specific
> value of parameter n. (These curves are determined with a somewhat
> complicated process depending on the value of n, so I cannot just use
> one bivariate function to describe this family of curves.)
>
> Can anyone tell me how to plot these curves in a 3D plot, while adding
> n as the second axis?
>
> For example, how can I make Mathematica plot the following lines in a
> 3D plot?
>
> n=1, l1 = Line[{{2, 7}, {3, 9}}]
> n=2, l2 = Line[{{2, 6}, {3, 8}}]
>