Re: Varying color in ParametricPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg35039] Re: Varying color in ParametricPlot
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 20 Jun 2002 23:54:36 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <aersih$3g4$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
pp = ParametricPlot[{Cos[t], Sin[t]}, {t, 0, 2Pi},
DisplayFunction -> Identity];
Show[
pp /. Line[pnts_] :>
MapIndexed[{Hue[(#2[[1]]-1)/Length[pnts]], Line[#1]} &,
Drop[Transpose[{pnts, RotateLeft[pnts]}], -1]],
DisplayFunction -> $DisplayFunction]
Regards
Jens
"Student, T.U.E." wrote:
>
> What I would like to do, is the following:
>
> I have defined 2 functions x[t] and y[t] and I would like to plot them
> parametrically using ParametricPlot with a color that is also a function of
> t (something like Hue[t]).
>
> I haven't been able to figure this out using help in Mathematica. I have
> tried to use ColorOutput and PlotStyle but that doesn't seem to work. Does
> anyone have a solution to this problem.