This is what I have now

Clear[x, y, f]; ​​
f[x_, y_] = E^(-x^2+y);

surface = Plot3D[f[x, y], {x, -2, 2}, {y, -2, 2}]; 
threedims = Axes3D[3];
datapoint = Graphics[{Red, PointSize[0.03], Point[{0,0,1}]}];

Show[threedims, datapoint,surface, ViewPoint -> CMView, PlotRange -> All, Boxed -> False]​

closed as off-topic by MarcoB, m_goldberg, Bob Hanlon, Jens, Sjoerd C. de Vries Sep 14 '15 at 5:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Bob Hanlon, Jens, Sjoerd C. de Vries
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    $\begingroup$ mathematica.stackexchange.com/questions/41439/… $\endgroup$ – IPoiler Sep 14 '15 at 0:43
  • $\begingroup$ I don't know the command Axes3D; I am also unfamiliar with the CMView option value for ViewPoint. Are you using some special plotting package? $\endgroup$ – MarcoB Sep 14 '15 at 0:53
  • $\begingroup$ I figured it out, thanks! $\endgroup$ – Nika Sep 14 '15 at 1:39

Replace Graphics with Graphics3D.

Also, note that you might prefer the result using Sphere instead of Point.

datapoint = Graphics3D[{Red, Sphere[{0, 0, 1}, 0.1]}]

enter image description here

  • $\begingroup$ I suppose you meant Point rather than Dot. $\endgroup$ – MarcoB Sep 14 '15 at 1:11
  • $\begingroup$ @MarcoB right, edited. $\endgroup$ – anderstood Sep 14 '15 at 1:23

This is an extended comment on anderstood's answer, which basically correct. However, some changes in details are in order.

Better to define your function with SetDelayed ( := ).

f[x_, y_] := E^(-x^2 + y)

The plot theme "NoAxes" is the easy way to get rid of both axes and bounding box. Also, making sure surface is not clipped.

surface = 
 Plot3D[f[x, y], {x, -2, 2}, {y, -2, 2},
   PlotRange -> All,
   PlotTheme -> {"NoAxes", "ZMesh"}];

The directive PointSize has no effect on spheres and so is not needed.

datapoint = Graphics3D[{Red, Sphere[{0, 0, 1}, .1]}];

Show[surface, datapoint, BoxRatios -> {1, 1, 1}]

The above code produces



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