Here is an example:
ContourPlot[Sin[y - x^2] == 0, {x, -1, 1}, {y, -10, 10}]
Because all these separate lines come from the same contour line Sin[y - x^2] == 0
, ColorFunction
color the contour lines as the same color. This is the correct behavior for most contour plots. However, for this example, color the same contour line with different color make sense. How can I do it in Mathematica?
Update
Let's make this question even more silly, because I actually have a figure must be draw part by part. Consider following code:
Show[{ContourPlot[Sin[y - x^2] == 0, {x, -2, 0}, {y, -10, 10}],
ContourPlot[Sin[-y - x^2] == 0, {x, 0, }, {y, -10, 10}]},
PlotRange -> All]
The question is the same, how to color the lines with different colors?