MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: how to generate many plots without so many input lines?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9667] RE: [mg9651] how to generate many plots without so many input lines?
  • From: jmthomas <jmthomas at cybercable.tm.fr>
  • Date: Fri, 21 Nov 1997 01:31:04 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Try this:
object1={Cos at t,Sin at t} (*this is a circle of radius 1 centered on {0,0}
*) object2={1+Cos at t,1+Sin at t} (*this is a circle of radius 1 centered on
{1,1}  *)
ParametricPlot[Evaluate at {object1,object2},{t,0,2 
Pi},AspectRatio->Automatic]

The Evaluate is not stricly necessary, but without it you will get a 
warning message. See the notes on evaluation for Plot and related
functions  to understand the warning message.
AspectRatio is not necessary too, but if you want a circle to look like
a  circle, you need it!

----------------------------------------------- Jean-Marie THOMAS
Conseil et Audit en Ingenierie de Calcul jmthomas at cybercable.tm.fr
+33 (0)3 88 32 93 64
www.cybercable.tm.fr/~jmthomas
=======================

-----Original Message-----
From:	robpeterson at iname.com [SMTP:robpeterson at iname.com] To:
mathgroup at smc.vnet.net
Sent:	Tuesday, November 18, 1997 1:50 AM To:	mathgroup at smc.vnet.net
Subject:	[mg9651] how to generate many plots without so many input
lines?

The following code nicely plots a bunch of curves on one plot.

*************************************** x[u_,v_]:=(u+1+Exp[u]
Cos[v])/Pi;
y[u_,v_]:=(v+ Exp[u] Sin[v])/Pi;

(* here are the equipotential surfaces  *) v=Pi;
a=ParametricPlot[{x[u,v],y[u,v]},{u,-2Pi,Pi},
    AspectRatio->Automatic,DisplayFunction->Identity];

v=Pi/1.2;
b=ParametricPlot[{x[u,v],y[u,v]},{u,-2Pi,Pi},
    AspectRatio->Automatic,DisplayFunction->Identity];

v=Pi/1.5;
c=ParametricPlot[{x[u,v],y[u,v]},{u,-2Pi,Pi},
    AspectRatio->Automatic,DisplayFunction->Identity];

v=Pi/2;
d=ParametricPlot[{x[u,v],y[u,v]},{u,-2Pi,Pi},
    AspectRatio->Automatic,DisplayFunction->Identity];

v=Pi/4;
e=ParametricPlot[{x[u,v],y[u,v]},{u,-2Pi,Pi},
    AspectRatio->Automatic,DisplayFunction->Identity];

v=-Pi/4;
f=ParametricPlot[{x[u,v],y[u,v]},{u,-2Pi,Pi},
    AspectRatio->Automatic,DisplayFunction->Identity];

v=-Pi/2;
g=ParametricPlot[{x[u,v],y[u,v]},{u,-2Pi,Pi},
    AspectRatio->Automatic,DisplayFunction->Identity];

v=-Pi;
h=ParametricPlot[{x[u,v],y[u,v]},{u,-Pi,Pi},AspectRatio->Automatic,
    DisplayFunction->Identity];

Show[{a,b,c,d,e,f,g,h},
  DisplayFunction->$DisplayFunction]

*****************************************

Surely there is a way to generate the list {a,b,c,d,e,f,g,h} more
easily/elegantly. Here's what I tried:

{a,b,c,d,e,f}=
  ParametricPlot[{x[u,v],y[u,v]},{u,-Pi,Pi},AspectRatio->Automatic,
      DisplayFunction->Identity]
/.  v->{Pi/1.2,Pi/1.5,Pi/2,Pi/4,Pi/8,Pi/16}

This doesn't work at all.  I get all kinds of error messages I don't
understand. Can someone tell me whether each plot must be generated on
a separate line?

Thanks for any clues, Rob



  • Prev by Date: FindRoot with complex roots
  • Next by Date: Re: how to generate many plots without so many input lines?
  • Previous by thread: Re: how to generate many plots without so many input lines?
  • Next by thread: Re: how to generate many plots without so many input lines?