Re: SphericalPlot3D ColorFunction problem
- To: mathgroup at smc.vnet.net
- Subject: [mg104720] Re: SphericalPlot3D ColorFunction problem
- From: Peter Breitfeld <phbrf at t-online.de>
- Date: Sat, 7 Nov 2009 07:02:02 -0500 (EST)
- References: <hd0spr$7jb$1@smc.vnet.net>
Porscha Louise McRobbie wrote:
> Hello,
>
> Can anyone explain why the following simple plot is a single color?
>
> SphericalPlot3D[Abs[Cos[t]], {t, 0, Pi}, {p, -Pi, Pi},
> ColorFunction -> Function[{t}, Hue[Arg[Cos[t]]/(2. Pi)]],
> ColorFunctionScaling -> False]
>
> Arg[Cos[t]]/(2. Pi)] should be zero for t<Pi/2, and 0.5 for t>Pi/2, so
> I expect the the upper lobe of the plot to be red (Hue[0]) and the
> lower lobe to be cyan (Hue[0.5]). Is there something different about
> ColorFunctions in SphericalPlot3D compared with Plot3D?
>
> Any help is greatly appreciated!
>
> Porscha
>
If you look at the options section of Spherical Plot, you will see, that
in the general case ColorFunction has to be a function of 6 variables
like Function[{x,y,z,z,theta,phi,r}, stuff]
--
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de