Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'color function' topicStudent Support Forum > General > "color function"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
10/09/12 1:04pm

behind the link "More Information" says

"With the usual default setting ColorFunctionScaling->True, all arguments supplied to func are scaled to lie in the range 0 to 1."

In[1]:= xMin= -3; xMax=3; yMin= -3; yMax=3;
f[x_, y_] := x+2y;
cfun[z_] := Which[z < .5, RGBColor[0, 0, 1], z ≥ .5, RGBColor[0.6, 0.4, 0.2]];
ContourPlot[f[x, y], {x, xMin, xMax}, {y, yMin, yMax}, ColorFunction -> cfun]

Out[7]= <graph snipped>

Note: I got those RGBColor values by looking up Blue and Brown in the help system.

Really understanding all the subtle details of ColorFunction in all the various ways it is used in all the various plot functions is a serious challenge.

URL: ,

Subject (listing for 'color function')
Author Date Posted
color function Rick 10/09/12 00:25am
Re: color function Bill Simpson 10/09/12 1:04pm
< Previous CommentHelp | Reply To Comment | Reply To Topic