cp = ContourPlot[Sin[x - y] + Cos[x + y], {x, -10, 10}, {y, -10, 10},
PlotPoints -> {30, 30}, PlotRange -> {{-10, 10}, {-10, 10}},
ColorFunction -> "Rainbow", ImageSize -> 500,
Axes -> True];
Replace[cp, {Tooltip[{d___, l__Line}, t : (0. | 1. | -1.)] :> {Thick, Opacity[1],
t /. {0. -> Green, -1. -> Red, 1. -> Blue, _ -> {d}}, Tooltip[{l}, t]}}, All]
Alternatively, extract the contours from cp
and redo ContourPlot
using styled contours:
contours = Cases[cp, Tooltip[_, t_] :> t, All];
styledcontours = Join[ {#, Directive[##2]} & @@@
Thread[{{0., -1., 1.}, {Green, Red, Blue}, Thick, Opacity[1]}],
Complement[contours, {0., -1., 1.}]];
ContourPlot[Sin[x - y] + Cos[x + y], {x, -10, 10}, {y, -10, 10},
PlotPoints -> {30, 30}, PlotRange -> {{-10, 10}, {-10, 10}},
ColorFunction -> "Rainbow", ImageSize -> 500, Axes -> True,
Contours -> styledcontours]