RE : Combining two paramteric plots into one.
- To: mathgroup at smc.vnet.net
- Subject: [mg49122] RE : [mg49094] Combining two paramteric plots into one.
- From: "Florian Jaccard" <florian.jaccard at eiaj.ch>
- Date: Fri, 2 Jul 2004 02:01:22 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello ! First type : <<Graphics`Graphics` and then use DisplayTogether Instead of Show... It should work fine ! You could also use DisplayFunction , but it is a bit more complicated. F.Jaccard -----Message d'origine----- De : Bob Harris [mailto:nitlion at mindspring.com] Envoyé : jeudi, 1. juillet 2004 11:26 À : mathgroup at smc.vnet.net Objet : [mg49094] Combining two paramteric plots into one. Howdy, I'm trying to plot two ellipses together on one plot. I have accomplished this, except that mathematica plots three figures-- ellipse 1, then ellipse 2, then the combination of the two. I want to avoid the first two figures. Here's what I am doing. ellipsePoint[{xc_, yc_, w_, h_, a_}, t_] := {((w Cos[a] Cos[t] - h Sin[a] Sin[t]) + xc)/2, ((w Sin[a] Cos[t] + h Cos[a] Sin[t]) + yc)/2} ellipsePlot[{xc_, yc_, w_, h_, a_}] := ellipsePlot[{xc, yc, w, h, a}, 20] ellipsePlot[{xc_, yc_, w_, h_, a_}, n_] := ParametricPlot[ {ellipsePoint[{xc, yc, w, h, a}, 2\[Pi] t/n][[1]], ellipsePoint[{xc, yc, w, h, a}, 2\[Pi] t/n][[2]]}, {t, 0, n}, AspectRatio -> Automatic] ellipsePlotTwo[{xc1_, yc1_, w1_, h1_, a1_}, {xc2_, yc2_, w2_, h2_, a2_}] := Show[ ellipsePlot[{xc1, yc1, w1, h1, a1}], ellipsePlot[{xc2, yc2, w2, h2, a2}]] Apparently what happens is ParametricPlot[...] always draws a figure so when I call it inside Show (via ellipsePlot[...]), I get a figure drawn that I don't want to draw yet. How can I call ParametricPlot and just get the resulting graphical object without it drawing it? I have similar problems with other combinations with ellipsePlot. For example, using ListPlot to try to add a list of points on the figure (i.e. Show[ellipsePlot[...], ListPlot[...]]) I get three figures instead of just the one I want. Thanks, Bob H