Skip to main content
deleted 6 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

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}]

enter image description here

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}]

enter image description here

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}]

enter image description here

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]}, 
    Contours -> {{0}}] /. Tooltip[a_, _] :> Tooltip[a, m], 
  {m, 4, 0, -1}]

enter image description here

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}]

enter image description here

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]]], None}, 
    Contours -> {{0}}] /. Tooltip[a_, _] :> Tooltip[a, m], 
  {m, 4, 0, -1}]

enter image description here

added 525 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

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}]

enter image description here

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]}, 
    Contours -> {{0}}] /. Tooltip[a_, _] :> Tooltip[a, m], 
  {m, 4, 0, -1}]

enter image description here

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}]

enter image description here

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}]

enter image description here

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]}, 
    Contours -> {{0}}] /. Tooltip[a_, _] :> Tooltip[a, m], 
  {m, 4, 0, -1}]

enter image description here

Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

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}]

enter image description here