Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: SphericalPlot3D ColorFunction problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104682] Re: [mg104653] SphericalPlot3D ColorFunction problem
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Sat, 7 Nov 2009 06:44:44 -0500 (EST)
  • References: <200911061014.FAA07949@smc.vnet.net>

Why not just reading the documentation?

SphericalPlot3D[Abs[Cos[t]], {t, 0, Pi}, {p, -Pi, Pi}, 
 ColorFunction -> 
  Function[{x, y, z, t, p, r}, Hue[Arg[Cos[t]]/(2. Pi)]], 
 ColorFunctionScaling -> False]

Cheers
Patrick

On Fri, 2009-11-06 at 05:14 -0500, 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
> 



  • Prev by Date: Re: SphericalPlot3D ColorFunction problem
  • Next by Date: Re: Passing function arguments as lists of replacement rules
  • Previous by thread: Re: SphericalPlot3D ColorFunction problem
  • Next by thread: Re: SphericalPlot3D ColorFunction problem