Re: Combining 2D graphs into a 3D graph
- To: mathgroup at smc.vnet.net
- Subject: [mg49449] Re: Combining 2D graphs into a 3D graph
- From: suomesta at yahoo.com (Carol Ting)
- Date: Tue, 20 Jul 2004 07:53:53 -0400 (EDT)
- References: <cddpep$pcp$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hello,
I've tried all the suggestions from you and others, and they all work.
Thank you guys very much!
But I have two more related questions:
1. When I run all the three modules together, I get an error message
for the second one, which reads "Show::gtype: StackGraphics is not a
type of graphics. " And if I run them separately things work out
beautifully. Is there an explanation for this? I don't get it.
2. Is there a way for me to fit a surface to the family of curves I
have? Being able to stack the curves is good enough, but I guess my
boss will have this further suggestion.
Again, thank you so much!
Carol
BobHanlon at aol.com wrote in message news:<cddpep$pcp$1 at smc.vnet.net>...
> 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}}]
> >