1

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:

bad

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: trash

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

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

OD IUM
  • 140
  • 1
    No idea, but your code works fine with xelatex. – Bernard Jan 08 '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. –  Jan 09 '19 at 14:37

1 Answers1

1

You viewed the dvi output! That cannot show graphical elements or rotations. Use the pdf output for the viewer.

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

See "Frequently Done Errors" No 4 on http://tug.org/PSTricks

  • this particular example works fine with xelatex, however, the other simple example results in a complete mess (see my edit). BTW: pdflatex with auto-pst-pdf doens't work at all. At it does is just printing the source code into the pdf. – OD IUM Jan 09 '19 at 09:27
  • I am using auto-PST-pdf for more than 10 years and never had a problem –  Jan 09 '19 at 14:30