Student Support Forum: 'color function in contourplot' topicStudent Support Forum > General > "color function in contourplot"

 Next Comment > Help | Reply To Topic
 Author Comment/Response rudy 10/02/07 04:04am hello, i've a function wich i plot the contourplot: In > disp[kl_, z_] := SetPrecision[ 1 + (1/kl)^2*(1 + I*Sqrt[Pi]*(z/(Sqrt[2.]*kl))* Exp[-(z/(Sqrt[2.]*kl))^2]*(1 + Erf[I*z/(Sqrt[2.] *kl)])), 100]; In > ContourPlot[Abs[disp[0.1, x + I y]]^2, {x, -1.5, -.5}, {y, -0.5, 0.5}, ColorFunction -> "IslandColors", Contours -> ({4, 1, 0.4, 0.25, 0.15, 0.05, 0.01, 0.001} // Reverse)] ok it works, but if i want to make another type of coloration: ColorFunction-> RGBColor[0,0,#]& it doesn't work: i've the error message: ContourPlot::nonopt: "Options expected (instead of ColorFunction->RGBColor[0,0,#1]&) beyond position 3 in ContourPlot[Abs[disp\$196[0.1,x+\[ImaginaryI]\y]]^2,{x,First[{-1.5,1.5}\ ],Last[{-1.5,1.5}]},<<3>>,PlotPoints->10]. An option must be a rule or a list of rules. " the documentation isn't very explicit... it say that the argument of the color function must be the contours..... i dont understand why RGBColor[0,0,#]& doesn't work.... thanks for help rudy URL: ,

 Subject (listing for 'color function in contourplot') Author Date Posted color function in contourplot rudy 10/02/07 04:04am Re: color function in contourplot yehuda ben-s... 10/02/07 2:06pm Re: Re: color function in contourplot rudy 10/04/07 03:20am
 Next Comment > Help | Reply To Topic