# pst3d-plot misplaces text

Example file from here:

\documentclass{article}

\usepackage{pst-3dplot}

\begin{document}

\begin{pspicture}(-3.2,-2.73)(3.18,3.65)
\pstThreeDCoor[
xMin = -4,
xMax = 4,
yMin = -4,
yMax = 4,
zMax = 3,
arrows = <->
]
\psplotThreeD[
plotstyle = line,
linecolor = blue,
yPlotpoints = 40,
xPlotpoints = 30,
linewidth = 0.5pt,
hiddenLine = true
](-2,2)(-2,2)
{x 100 mul cos y 100 mul sin sub}
\rput(0,3.5){$f(x,y) = \cos(100x) - \sin(100y)$}
\end{pspicture}

\end{document}


Result:

I'm using Latex to produce DVI output.

Any ideas what might go wrong here?

EDIT: The example above seems to work with xelatex. However, consider the following:

\documentclass{article}
\usepackage{pst-3dplot}
\begin{document}
\psset{unit=1cm}
\begin{pspicture}(-5,-5)(5,5)
\psset{coorType=1,Alpha=135}
\pstThreeDCoor[linecolor=black, IIIDlabels, IIIDticks, xMin=-1,xMax=5,yMin=-1,yMax=5,zMin=-1,zMax=5]%
\end{pspicture}
\end{document}


xelatex compiles this into:

EDIT2: See solution here SOLUTION: Use latex-> dvi2ps -> ps2pdf (if you need pdf)

EDIT3: Could anyone pls recommend me another 3d plot package?

• No idea, but your code works fine with xelatex. – Bernard Jan 8 '19 at 17:55
• For the second example: there is a problem with the xdvipdfmx driver. I'll have a look at it. Using auto-pst-pdf works fine. – user2478 Jan 9 '19 at 14:37

latex->dvips->ps2pdf or xelatexorpdflatexwith packageauto-pst-pdf`