Graphics, Figures & TablesPSTricks | Order of Layers in a 3D Figure

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Grasshoper
Posts: 6
Joined: Mon Mar 12, 2012 1:44 pm

PSTricks | Order of Layers in a 3D Figure

Post by Grasshoper »

Hi everybody,

I'm actually using PSTricks for plotting 3 grids in a 3D graph, however, it seems the vertical position of layers (the grids) is not ordered (the layer above is over the bottom layer) and it looks strange when I plot the whole.

My code is:

Code: Select all

\begin{center}
\def\gridG{\psgrid[gridlabels=7pt, subgriddiv=0,gridcolor=darkgray](0,0)(10, 10)}
\def\gridB{\psgrid[gridlabels=0pt, subgriddiv=0,gridcolor=gray](0,0)(10, 10)}
\def\gridZ{\psgrid[gridlabels=0pt, subgriddiv=0,gridcolor=lightgray](0,0)(10, 10)}
\psset{xunit=0.5cm,yunit=0.5cm}
\begin{pspicture}(0,-2)(11,11)
    \ThreeDput[normal=0 0 1](0,0,8){\gridG}
    \ThreeDput[normal=0 0 1](0,0,5){\gridB}
    \ThreeDput[normal=0 0 1](0,0,2){\gridZ}
\end{pspicture}
\end{center}
I tried some modifications using uput to order the layers:

Code: Select all

\ThreeDput[normal=0 0 1](0,0,8){\rput[b]{\gridG}}
but it fails.

Thanks in advance,

GrassH

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply