TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. 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

I'd like to draw 3D-objects in cabinet projection with angle α=26.565° (i.e. atan(α) = 0.5) and scaling factor k=0.5590 = sqrt(5)/4, because the objects should be drawn on a grid, as in the left picture (2-1-coordinate system, from a math book on analytical geometry).

coord systems

A related question is here (Cabinet projection in PSTricks). There Herbert proposes to use pst-3dplot.pro with coordType=5, but doing this I get five unwanted effects: (1) the scaling factor k is too small, (2) the axes are changed, I need y and z axes parallel to drawing plane, (3) to get the right angle for the z axis, I have to set Alpha=-153.435, and this results in a corresponding labeling of the axes, (4) the coordinate system is turned around clockwise 90 degrees, (5) the label „x“ of the horizontal axe is ON the axe, not above or below or besides it:

Minimal example:

\begin{pspicture} %(-2,-2)(3,3)
\psset{subgriddiv=2, gridlabels=0pt,    % grid
   gridwidth=0.4pt, subgridwidth=0.4pt,
   gridcolor=black!50, subgridcolor=black!50}
\psgrid(-4,-3)(6,6) %(x2,y2)
\pstThreeDCoor[xMin=0,xMax=5, yMin=0,yMax=5, zMin=0,zMax=5,%
  IIIDlabels,drawing=true, %Alpha=90, %Beta=30,

Wolfgang Büchel

share|improve this question
up vote 5 down vote accepted

Try it with the pst-3dplot.pro from http://texnik.dante.de/dvips/pst-3dplot/ and the pst-3d-plot.tex from http://texnik.dante.de/tex/generic/pst-3dplot/ with the coorType=6.


\pstThreeDCoor[xMin=0,xMax=5, yMin=0,yMax=5, zMin=0,zMax=5,%



The angle is now set inside pstricks-3dplot.tex. If it is ok for you, I'll upload it to CTAN/TeXLive.

share|improve this answer
Thanks, @Herbert, that's a step forward, but some problems remain (please see the left picture above to see what I wanted): (1) The angle between x and z axes (in your picture above) should be 153.4349 degrees, not 135 degrees; (2) the scaling factor for (your) z axe should be 0.559; (3) the horizontal axe should be y, the vertical axe should be z, x comes into the front; (4) the labels of the axes should not be inclined, but parallel to the drawing plane. Wolfgang – Wolfgang Büchel Jan 29 '14 at 17:06
for the scaling of the z axis search in the pro file for coorType 6. The you'll see that the z value is multiplied with 0.5. Choose 1 or another value and try it again. – Herbert Jan 29 '14 at 18:27
OK, thanks again, @Herbert, after changing the lines in the pro file to coorType 6 le { % /x2D y x neg 0.559 mul Alpha cos mul add def /y2D z x neg 0.559 mul Alpha sin mul add def exit } if (to get the wanted k value and axis labeling) and setting the value of Alpha (in my tex file) to 26.565 degrees it's nearly perfect. Only two unwanted effects remain: (1) the labels of numbers on the axes are inclined (as in your picture above) (2) the coordinate system is rotated anti-clockwise around by 90 degrees. How can I get rid of these effects? - Wolfgang – Wolfgang Büchel Jan 30 '14 at 6:35
case 1 needs some work to change the code and case 2 is a problem with a too clever ghostscript. Use -dAutoRotatePages=/None see (tug.org/PSTricks/main.cgi?file=pdf/pdfoutput#pst-pdf) or wait until you have some other text in your tex file then it will be correct, – Herbert Jan 30 '14 at 8:20
see my edit. It makes more sense here to write the labels yourself. – Herbert Jan 30 '14 at 9:08

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.