Generate separate ContourPlot
for each m
with contour 0
and change the tooltip label to m
and combine all with Show
:
Show @ Table[ContourPlot[Evaluate[(x^2 + y^2)^2 - m (x^2 - y^2)], {x, -2, 2}, {y, -2, 2},
ContourStyle -> Directive[Thick, ColorData[63][m]],
ContourShading -> {Opacity[.2, ColorData[63][m]], White},
Contours -> {{0}}] /. Tooltip[a_, _] :> Tooltip[a, m], {m, 0, 4}]
Generate the plots in the opposite order to get opaque colors without blending:
colors = {Cyan, Red, Blue, Orange, Green};
Show @ Table[ContourPlot[(x^2 + y^2)^2 - m (x^2 - y^2) , {x, -2, 2}, {y, -2, 2},
ContourStyle -> Directive[Thick, Darker@Darker@colors[[m + 1]]],
ContourShading -> {Opacity[1, colors[[m + 1]]], Opacity[0]None},
Contours -> {{0}}] /. Tooltip[a_, _] :> Tooltip[a, m],
{m, 4, 0, -1}]