MathGroup Archive 2010

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

Search the Archive

Re: How To invert ColorFunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106738] Re: [mg106719] How To invert ColorFunction
  • From: "Eric G" <eric.phys at gmail.com>
  • Date: Fri, 22 Jan 2010 05:38:37 -0500 (EST)
  • References: <201001211131.GAA20635@smc.vnet.net>

Hi Vladimir,
 try this:

c4 = 1;

z4[rho_, theta_] := rho^2*Cos[2*theta];

min = -1 (* the minimun in your z axis*);
max = 1   (*...maximun ....*);

RevolutionPlot3D[c4*z4[rho, theta], {rho, 0, 1}, {theta, 0, 2*Pi}, 
 ColorFunction -> (ColorData["Rainbow"][(#3 - min)/(max - min)] &), 
 ColorFunctionScaling -> False]

----- Original Message ----- 
From: "Vladimir" <svetlana_47 at yahoo.de>
To: <mathgroup at smc.vnet.net>
Sent: Thursday, January 21, 2010 3:31 AM
Subject: [mg106738] [mg106719] How To invert ColorFunction


> Hi everybody,
> 
> I am plotting Zernike-Polynomials like this:
> 
> ---------
> c4 = 1;
> 
> z4[rho_, theta_] := rho^2*Cos[2*theta]
> 
> RevolutionPlot3D[c4*z4[rho, theta], {rho, 0, 1}, {theta, 0, 2*Pi},
> ColorFunction -> "Rainbow"]
> ---------
> 
> To be able to compare the plot to measured data from an
> interferometer, I would like to invert the Rainbow colouring, that is
> red at the bottom and blue on top. However, I can't find to work this
> out. Does anyone know how to do this?
> 
> Thank you,
> Vladimir.
> 
>


  • Prev by Date: BezierCurve vs. BezierFunction
  • Next by Date: Re: More /.{I->-1} craziness
  • Previous by thread: Re: How To invert ColorFunction
  • Next by thread: Re: How To invert ColorFunction