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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply