[pstricks] Spurious spaces and psplotThreeD?

Richard Hensh henshric at msu.edu
Wed Feb 9 14:20:01 CET 2005


In the following minimal example, the \psplotThreeD objects are successively
right-shifted (slightly). I've run across similar problems in the past only
to discover that my own code contained spurious spaces. I don't think that
is the case here.

Curiously, commenting out the second of the three \psplotThreeD objects
eliminates the offset between the two curves but there is still a right
shift relative to the coordinate axis?

Any thoughts?

Additional testing seems to show that the \psset command is part of the
problem. 

Thanks
ricky


\documentclass[10pt,dvips]{article}
\usepackage{pst-3dplot}%
\usepackage{pst-plot,pst-math,pstricks-add}%
\newpsstyle{myThreeDStyle}%
{xMin=\xMin,xMax=\xMax,yMin=\yMin,yMax=\yMax,zMin=\zMin,zMax=\zMax%
,linewidth=0.75pt,linecolor=black}%
\begin{document}
\def\xmin{-4}\def\xmax{6}
\def\ymin{-4}\def\ymax{6}
% For pst-3dplot
\def\xMin{-2}\def\xMax{10}
\def\yMin{-2}\def\yMax{5}
\def\zMin{-2}\def\zMax{6}
\def\angAlpha{90}\def\angBeta{20}
\psset{plotstyle=curve,xPlotpoints=50,yPlotpoints=100,linewidth=1pt}
\psset{unit=1cm,Alpha=\angAlpha,Beta=\angBeta}
\begin{center}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)%\showgrid
\pstVerb{/surface {10 x dup mul y dup mul add sub 0.5 mul} def}%
\pstThreeDCoor[style=myThreeDStyle]%
\psset{drawStyle=xLines,linecolor=red,linewidth=0.75pt}%
\psplotThreeD(-3,0)(-1,-1){surface}%
\psplotThreeD[drawStyle=xyLines,linecolor=gray](-3,3)(-3,3){surface}%
\psplotThreeD(0,3)(-1,-1){surface}%
\end{pspicture}
\end{center}
\end{document}




More information about the PSTricks mailing list