       Re: ParametricPlot

• To: mathgroup at smc.vnet.net
• Subject: [mg14512] Re: ParametricPlot
• From: "Allan Hayes" <hay at haystack.demon.co.uk>
• Date: Thu, 29 Oct 1998 04:33:12 -0500
• References: <70rkm0\$4u5\$8@dragonfly.wolfram.com>
• Sender: owner-wri-mathgroup at wolfram.com

```Peter wrote in message <70rkm0\$4u5\$8 at dragonfly.wolfram.com>...
>I have the following defintion in Mathematica notebook (version 3.01 for
>Mac):
>
>eight[t_]:={Sin[t],Sin[t] Cos[t]}
>
>Trying to plot this by executing
>
>ParametricPlot[eight[t],{t,0,2 Pi}];
>
>produces the right graphic but also an warning:
>
>ParametricPlot::"ppcom": "Function eight[t] cannot be compiled; plotting
>will proceed with the uncompiled function."
>
>What is wrong ?
>
>Email: phuesser at bluewin.ch
>

Peter:
Nothing wrong: with ParametricPlot[eight[t],{t,0,2 Pi}] Mathematica
looks at eight[t] before it is evaluated to ={Sin[t],Sin[t] Cos[t]} and
decides that it cannot compile the function eight:

ParametricPlot[eight[t],{t,0,2 Pi}];//Timing

ParametricPlot::"ppcom":
"Function eight[t] cannot be compiled; plotting will proceed with \
the uncompiled function."

{1.15 Second,Null}

But we can make it look at the evaluated function (which it sees that it
can compile):

ParametricPlot[Evaluate[eight[t]],{t,0,2 Pi}];//Timing

{0.28 Second,Null}

As expected this is a lot quicker.

In fact this is equivalent to

ParametricPlot[{Sin[t],Sin[t] Cos[t]},{t,0,2 Pi}];//Timing

{0.28 Second,Null}

Allan

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

```

• Prev by Date: RE: 2 ticks on a 2D plot
• Next by Date: Problem with Show. FAQ
• Previous by thread: Re: ParametricPlot
• Next by thread: Re: ParametricPlot