# pst-3dplot and drawing cylinders

I am drawing a cylinder with \psCylinder from pst-3dplot, as shown here in a MWE from the manual:

\documentclass{article}
\usepackage{pst-3dplot}

\begin{document}

\begin{pspicture}(-3,-2)(3,7)
\psset{Beta=10}
\pstThreeDCoor[zMax=7]
\psCylinder[increment=5]{2}{5}
\end{pspicture}

\end{document}


The z-axis points vertically - how can I make it horizontal?

• Don't you just want the cylinder to lay horizontal rather than have the z-axis be horizontal? – Werner Feb 7 '14 at 18:31
• The cylinder axis should be aligned with z – BillyJean Feb 7 '14 at 18:33
• I don't know exactly what you're after. You can rotate the axis as well as the cylinder (independently). See p 19 (section 4 Rotation) of the pst-plot3d documentation. – Werner Feb 7 '14 at 18:41
• @Werner Using RotZ=0 doesn't make the z-axis horizontal, it always points vertically (either up or down) – BillyJean Feb 7 '14 at 19:03
• Using \pstThreeDCoor[RotSequence=quaternion,RotSet=set,RotAngle=90,xRotVec=1,yRotVec=0,zRotVec=0,zMax=7] rotates the z-axis through 90 degrees around the x-axis. – Werner Feb 7 '14 at 19:07

Do you want something like this?

\documentclass{article}
\usepackage{pst-3dplot}
\begin{document}

\psset{Alpha=0,Beta=90}
\begin{pspicture}(-3,-2)(3,7)
\pstThreeDCoor[zMax=7]
\psCylinder[RotX=90,RotY=45,increment=5]{2}{5}
\end{pspicture}

\end{document}