Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, I am trying to plot the single level curve of


that goes through the point (3pi,3pi). Can anyone show me how to do this?

share|improve this question
up vote 4 down vote accepted

Just for illustrative purposes:

f[x_, y_] := x Sin[y/x] + y Sin[2 x]
pt = f[3 Pi, 3 Pi];
plot = Plot3D[f[x, y], {x, -4 Pi, 4 Pi}, {y, -4 Pi, 4 Pi}, 
   MeshFunctions -> (#3 &), Mesh -> {{pt}}, MeshStyle -> {Thick, Red},
    PlotPoints -> 100, ColorFunctionScaling -> False];
 Graphics3D[{Yellow, PointSize[0.03], Point[{{3 Pi, 3 Pi, pt}}]}]]

visualizes the level curve (and point in yellow): enter image description here

Contour plot can visualize the level curve:

    ContourPlot[f[x, y], {x, -4 Pi, 4 Pi}, {y, -4 Pi, 4 Pi}, 
 Contours -> {pt}, ContourShading -> None, 
 Epilog -> {Red, PointSize[0.02], Point[{3 Pi, 3 Pi}]}]

enter image description here

You can improve quality with plot points.

share|improve this answer

Define the function you want to plot f[x,y] and the value(s) you want to plot and then use the ContourPlot command. You get somewhat different pictures by choosing different regions of x,y to plot over.

f[x_, y_] := x Sin[y/x] + y Sin[2 x]; 
ContourPlot[f[x, y] == f[3 Pi, 3 Pi], {x, 0, 25}, {y, 0, 25}]

enter image description here

share|improve this answer
Awesome, thanks bill s! – Logan Nov 10 '13 at 5:32
@ ubpdqn very sexy! – Logan Nov 11 '13 at 21:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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