Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

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

It is easy to make 3D Plots with Mathematica, e.g. use:


But I want to have nice plots in my thesis, so I decided to use pgfplots for $\LaTeX$ together with Mathematica. There you can use a picture (of Mathematica) and draw with $\LaTeX$ well readable axes etc. around the picture (see e.g. p.44 et seq. here).

But to use both programs together, I need plots which are in a parallel and not perspective projection. As you can see from the pic, Picture with perspective projection

Mathematica gives me a perspective projection. Is there a way to get a parallel projection?

share|improve this question
You can achieve an orthographic projection with the ViewMatrix option. The documentation has some usage examples. – Thies Heidecke Oct 28 '12 at 16:54
Why not something like Show[Graphics3D[{Thick, Black, Line[{{-3, -2, -1}, {5, -2, -1}}], Line[{{-3, -2, 1}, {5, -2, 1}}]}], Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}]] ? – b.gatessucks Oct 28 '12 at 17:03
@Thies Heidecke. Ok, this could help. But then I can never rotate my picture by hand, I have to calculate a lot just for one orthographic projection. And if I want to change my projection a bit, I have to calculate a lot again. Isn’t there a more convenient solution? b.gatessucks: I think you misunderstand the question, I do not want to have black lines in my picure, I want that the frame of my picture has parallel lines. If you check your solution you will see that this is not the case. – partial81 Oct 28 '12 at 17:37
up vote 16 down vote accepted

How about using far-away ViewPoint coordinates? The left one uses the default ViewPoint, the right one has parallel projection.

 Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, ViewPoint -> {1.3, -2.4, 2.0}],
 Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, ViewPoint -> {1.3, -2.4, 2.0}*1000]

Mathematica graphics

You can also directly prettify the labels and ticks:

Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, 
 LabelStyle -> Directive[14, Bold, Italic, FontFamily -> "Times"]]

Mathematica graphics

share|improve this answer
For single axes specs you can conveniently use Infinity as in ViewPoint->{0,0,Infinity} – Yves Klett Oct 28 '12 at 19:15
Thank you for this post! It took me a while to find the right ViewPoint for my real 3D Graphs, but now it works very well! Thanks also for the hint that one can improve in Mathematica directly the labels etc. If one is not as picky as me, this will work for sure too. @J. M. Thanks for the edit! – partial81 Oct 29 '12 at 9:58

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.