# 3D plots with parallel projection

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

 Plot3D[Sin[x+y^2],{x,-3,3},{y,-2,2}]


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,

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

• You can achieve an orthographic projection with the ViewMatrix option. The documentation has some usage examples. Commented Oct 28, 2012 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}]] ? Commented Oct 28, 2012 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. Commented Oct 28, 2012 at 17:37

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


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


• For single axes specs you can conveniently use Infinity as in ViewPoint->{0,0,Infinity} Commented Oct 28, 2012 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! Commented Oct 29, 2012 at 9:58