Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Another question aboutpst-solides3d and visibility:

How can one draw a legend on top of the 3d drawings ?

I thought that putting the put command before or after the 3d drawings commands would render the text in the foreground, but with both ways, the text is hidden:

\documentclass[10pt]{article}

\usepackage{graphicx}
\usepackage{pstricks}
\usepackage{pst-solides3d}


\begin{document}

\begin{figure}[h!]
\centering
\begin{pspicture}(0,-3)(7,3)

\psset{viewpoint=60 30 30 rtp2xyz,Decran=60,lightsrc=viewpoint, solidmemory}

\Large
\rput(0.5,2.7){$x^2$}
\normalsize

\psSolid[object=cylindre, h=0.4,r=2.7, fillcolor=white, ngrid=1 32, RotY=0, RotX=0] (0,0,1.1445)

\Large
\rput(0,2.7){$x^2$}
\normalsize

\end{pspicture}
\end{figure}

\end{document}

Compilation: latex bug.tex; dvips bug.dvi; ps2pdf bug.ps

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

The easy way out is to include pst-3dplot package and then use \pstThreeDPut command.

\documentclass[10pt]{article}

\usepackage{graphicx}
\usepackage{pstricks}
\usepackage{pst-solides3d}
\usepackage{pst-3dplot}

\begin{document}

\begin{figure}[h!]
\centering
\begin{pspicture}(0,-3)(7,3)

\psset{viewpoint=60 30 30 rtp2xyz,Decran=60,lightsrc=viewpoint, solidmemory}

\psSolid[object=cylindre, h=0.4,r=2.7, fillcolor=white, ngrid=1 32, RotY=0, RotX=0]     (0,0,1.1445)

\Large
\pstThreeDPut(0,2.7,2.5){$x^2$}

\end{pspicture}
\end{figure}

\end{document}
share|improve this answer
add comment

Your Answer

 
discard

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.