I have a function of two variables defined on a region D in the x-y plane and I am looking at the contour curves of the form f(x,y)=cnst for several different constants. I am using the command ContourPlot[…] to plot the function and it’s level curves and I would like to render the level curves in different colors. Alas, the function RGBColor[…] is not an option for ContourPlot[…]. Is there any other way to render the level curves in a chosen color? As an example, I have the following code.
a=0;b=1;c=0;d=2;
f[x_,y_]=Sin[Pi x]^2 Sin[Pi y]^2;
ContourPlot[f[x,y],{x,a,b},{y,c,d},
ContourShading->False,
AspectRatio->Automatic,
Contours->{0,.2,.5,.7,.9},
PlotPoints->100,
AspectRatio->1,
DisplayFunction->$DisplayFunction];
