How can I define a ColorFunction
for my ContourPlot
using Piecewise
? For example after making a ContourPlot
for such this function:
p[x_,y_]:=1-Sin[x]^2*Sin[y]^2;
I want to define my ColorFunction
in a way that for example for 0<p<0.1
the plot have a different color than 0.1<p<0.2
. An example of what I need is in the following plot:
Which the color column at the right shows that each color corresponds to what value of p
.
ContourPlot[1 - Sin[x]^2*Sin[y]^2, {x, 0, Pi}, {y, 0, Pi}, PlotLegends -> Automatic, ColorFunction -> "DarkRainbow"]
– Vitaliy Kaurov Mar 25 at 23:000.8<p<0.9
.ColorFunction -> "DarkRainbow"
doesn't give me this option. – ZKT Mar 25 at 23:03