1
$\begingroup$

Here is how I am plotting the three implicit functions:

  Show [ ContourPlot[f[h, a] == 0, {a, 0, 0.6}, {h, 0, 1}, 
         ContourStyle -> Black], 
         ContourPlot[f2[h, a] == 0, {a, 0, 0.6}, {h, 0, 1}, 
         ContourStyle -> Red], 
         ContourPlot[f3[h, a] == 0, {a, 0, 0.6}, {h, 0, 1}, 
         ContourStyle -> Blue] ]

This works fine but I would like to add a legend, axis labels, larger fonts for the axes etc. I am using Mathematica 11.

$\endgroup$
  • 4
    $\begingroup$ To come up with an answer, most of us would want to run tests with your code. But you give us code with undefined symbols that won't evaluate. I think you are likely to get an answer if you would edit your question to include *all the code needed to reproduce your problem. $\endgroup$ – m_goldberg Oct 12 at 23:31
2
$\begingroup$

Arbitrary functions:

f[h_, a_] := h^2 - a^2

f2[h_, a_] := 2 h^2 - a^3

f3[h_, a_] := h^2 - 2 a^2

A single ContourPlot can handle multiple functions. This makes adding PlotLegends and other shared options quite easy.

ContourPlot[
 {f[h, a] == 0, f2[h, a] == 0, f3[h, a] == 0},
 {a, 0, 0.6}, {h, 0, 1},
 PlotLegends -> Placed["Expressions", {0.25, 0.7}],
 FrameLabel -> Automatic,
 BaseStyle -> {FontSize -> 14}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.