Help @ MC
LaTeX
Help @ MC Logo
Centre for Mathematical Sciences, Lund University
    Print this page!
Home

Up to Help

About
BibTeX
Graphics
PDF
TeX-system @ MClocal

Tools
maketex

Packages
PSTricks
Local:
mccover
mcslides
(prosper)

External links
*LaTeX Help 1.4
*TeX FAQ
*Complete TeX Catalog
*Att skriva rapport i LaTeX av Per Foreby
*CTAN
*TeX Primitive Control Sequences
*MikTeX (LaTeX for Windows)
*ps2pdf.com
*TexPoint
*Ghostscript & Ghostview




Printer-friendly
Print this page



Powered by Google

PSTricks

Table of Contents

Introduction

PStricks is a superb graphical extension to LaTeX that comes preinstalled with most distributions of LaTeX (otherwise you can download it). Don't miss it! The official homepage of PSTricks is http://www.tug.org/applications/PSTricks/. The PSTricks mailing list is Information about PSTricks.

Documentation and Manuals


PSTricks: Postscript macros for Generic TeX - User Manual
Timothy van Zandt
March 12, 1993
Version 0.93a

Pages: 99


Table Of Contents
Welcome to PSTricks
I. THE ESSENTIALS - 1. Arguments and delimiters, 2. Color, 3. Setting graphics parameters, 4. Dimensions, coordinates and angles, 5. Basic graphics parameters
II. BASIC GRAPHICS OBJECTS - 6. Lines and polygons, 7. Arcs, circles and ellipses, 8. Curves, 9. Dots, 10. Grids, 11. Plots (cont)
III. MORE GRAPHICS PARAMETERS - 12 Coordinate systems, 13. Line styles, 14. Fill Styles, 15. Arrowheads and such, 15. Custom styles
IV. CUSTOM GRAPHICS - 17. The basics, 18. Parameters, 19. Graphics objects, 20. Safe tricks, 21. Pretty safe tricks, 22. For hackers only
V. PICTURE TOOLS - 23. Pictures, 24. Placing and rotating whatever, 25. Repetition, 26. Axes
VI. TEXT TRICKS - 27. Framed boxes, 28. Clipping, 29. Rotation and scaling boxes
VII. NODES AND NODE CONNECTIONS - 30. Nodes, 31. Node connections, 32. Attaching labels to node connections
VIII. SPECIAL TRICKS - 33. Coils and zigzags, 34. Special coordinates, 35. Overlays, 36. The gradient fill style, 37. Adding color to tables, 38. Typesetting text along a path, 39. Stroking and filling character paths, 40. Importing EPS files, 41. Exporting EPS files
HELP - A. Boxes, B. Tips and More Tricks, C. Including PostScript code, D. Troubleshooting
INDEX

Download/View:
pst-usr.ps, pst-usr.pdf (or as the original seperate files pst-usr1.ps, pst-usr2.ps, pst-usr3.ps, pst-usr4.ps)


No name documentation

Pages: 51


Table Of Contents
1. Dots, 2. Arrowheads and such, 3. Lines and polygones, 4. Framed boxes, 5. Obsolete put commands
I. NODES AND NODE CONNECTIONS - 6. Nodes, 7. Node connections, 8. Node connections labels: I, 9. Node connection labels: II, 10. Attaching labels to nodes, 11. Mathematical diagrams and graphs (cont.), 12. Obsolete put commands
II. TREES - 13. Overview, 14. Tree Nodes, 15. Trees, 16. Edges, 17. Edge and node labels, 18. Details
(no index)

Download/View:
pst-doc.ps, pst-doc.pdf
(or as the original seperate files pst-doc1.ps, pst-doc2.ps)


PSTricks - Quick Reference
(author, date and version unknown)

Pages: 8


Download/View:
pst-quik.ps


Test file for PSTricks 97 distribution: most of the PSTricks examples of The LaTeX Graphics Companion
Sebastian Rahtz
September 9, 1998
Version 1.3

Pages: 15


This document contains a lot of useful examples that you could pick from. The file comes with the PSTricks distribution and the examples were generated by the following code snippets:

pst-test-code.txt, pst-test-code.2up.ps

Download/View:
test-pst.ps


Online LaTeX Tutorial: PSTricks Part I-VII
The Indian TeX User Group
2002-2003



This is a very nice set of slideshow presentations giving the details on the below topics and how it can be done with PSTricks. Contains plenty of examples and illustrations.

Table of contents:
Chapter 1: Graphics
Chapter 2: Colorful tricks
Chapter 3: Borderline tricks
Chapter 4: Curvy tricks
Chapter 5: Coordinates
Chapter 6: Placing things
Chapter 7: Plotting tricks

Download/View:
PSTricks Tutorial, The Indian TeX Users Group, Trivandrum, India.


Interesting Stuff

Examples

If you are accessing this page from a computer at the Centre for Mathematical Sciences, Lund University, you have access to an online LaTeX compiler with several prewritten examples. Try PSTricks just with a few clicks at TOOLS @ Centre for Mathematical Sciences.

Compilable examples

example001.tex

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Statistics in Genetics - Lecture Notes
%
% Author: Henrik Bengtsson, hb@maths.lth.se
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}
\usepackage{pst-all} % PSTricks

\pagestyle{empty}

\begin{document}
\TeXtoEPS 

\begin{tabular}{ccc}
  \rnode[right]{A}{
   \psframebox[linecolor=black,fillcolor=white,framearc=.3]{
    \rule[-2ex]{0pt}{5ex}
    \parbox[c]{35mm}{\centering Genotype}
   }
  }
 \\[13mm]
 & \hspace{20mm} &
  \rnode[center]{B}{
   \psframebox[linecolor=black,fillcolor=white,framearc=.3]{
    \rule[-2ex]{0pt}{5ex}
    \parbox[c]{35mm}{\centering Phenotype}
   }
  }
 \\[13mm]
  \rnode[right]{C}{
   \psframebox[linecolor=black,fillcolor=white,framearc=.3]{
    \rule[-2ex]{0pt}{5ex}
    \parbox[c]{35mm}{\centering
     Enviromental factors\\
     and covariates
    }
   }
  }

  \ncline[arrowscale=2,offsetB=3pt]{->}{A}{B}
   \aput{:U}{\small Model parameters}
  \ncline[arrowscale=2,offsetB=-3pt]{->}{C}{B}
   \bput{:U}{\small Model parameters}
\end{tabular}

\endTeXtoEPS
\end{document} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HISTORY
% 2002-11-27
% * Tog bort pluraländelserna (s) i två av de 3 boxarna. /POB
% 2001-10-16
% * Created! /HB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

example001.ps, example001.tex [1387 bytes]

example004.tex

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Statistics in Genetics - Lecture Notes
%
% Author: Henrik Bengtsson, hb@maths.lth.se
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass{article}
\usepackage{pst-all} % PSTricks

\pagestyle{empty}

\begin{document}
\TeXtoEPS 

\newpsobject{showgrid}{psgrid}{subgriddiv=1,griddots=10,gridlabels=6pt} 

\psset{xunit=10mm,yunit=10mm}
\begin{pspicture}(0,0)(5,5.5)
  %\showgrid  % Uncomment to show grid
  \psframe[linewidth=1pt,framearc=.1,fillstyle=none](0,0)(5,5)
  \rput(0.4,5.3){$\Omega$}
  \psellipse[linewidth=1pt,fillstyle=vlines](2,2.3)(1.5,0.75)
  \rput(2,2.3){\pscirclebox*[framesep=1.5pt]{$B$}}
  \psline[linewidth=1pt](0,3)(2,5)
  \rput(0.6,4.4){$C_1$}
  \psline[linewidth=1pt](1,4)(5,3)
  \rput(3.3,4.3){$C_2$}
  \psline[linewidth=1pt](2,0)(5,2)
  \rput(4.0,2.3){$C_3$}
  \psline[linewidth=1pt](3,3.5)(3,0.6666)
  \rput(3.9,0.6){$C_4$}
  \psline[linewidth=1pt](1.6,1)(3,2.5)
  \rput(2.3,0.9){$C_5$}
  \psline[linewidth=1pt](0,3)(1,2.5)
  \rput(0.7,0.9){$C_6$}
  \psline[linewidth=1pt](1,2.5)(2,3.75)
  \rput(0.9,3.3){$C_7$}
  \psline[linewidth=1pt](1,2.5)(2,0)
  \rput(2.3,3.3){$C_8$}
\end{pspicture}

\endTeXtoEPS
\end{document} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HISTORY
%
% 2001-10-22
% * Created!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

example004.ps, example004.tex [1430 bytes]

pstricks-4-10-10.tex

% PSTricks: Electronic circuit
\documentclass{article}
\usepackage{pst-all}  % PSTricks

\makeatletter
\newdimen\CurX
\newdimen\CurY
\newdimen\Cir@temp
\newcount\Cir@direction % 0 right, 1 left, 2 up, 3 down

\Cir@direction0

\def\SetX#1{\CurX=#1pt}
\def\SetY#1{\CurY=#1pt}

\def\ShowDirection{%
 \typeout{Direction:
 \ifcase\Cir@direction right\or left\or up\or down\fi,
    now at (\strip@pt\CurX,\strip@pt\CurY)}%
}

\def\ShowXY{\message{(\strip@pt\CurX,\strip@pt\CurY)}}

\def\Down#1{\advance\CurY  by -#1\p@\Cir@direction3%\ShowDirection
}
\def\Up#1{\advance\CurY  by #1\p@\Cir@direction2%\ShowDirection
}
\def\Left#1{\advance\CurX by -#1\p@\Cir@direction1%\ShowDirection
}
\def\Right#1{\advance\CurX by #1\p@\Cir@direction0%\ShowDirection
}

\def\MyBox#1#2{% width,height
  \pssetlength{\Cir@temp}{#1}%
  \rule{\Cir@temp}{\z@}%
  \pssetlength{\Cir@temp}{#2}%
  \rule{\z@}{\Cir@temp}%
}

\def\Point#1{%
  \rput(\strip@pt\CurX,\strip@pt\CurY){\pnode{#1}}%
}

\def\Switch#1{%
  \message{[Switch] #1}\ShowXY
  \relax
  \ifcase\Cir@direction % right
    \rput[b](\strip@pt\CurX,\strip@pt\CurY){%
      \rnode[b]{#1}{%
        \psline(.5,.4)%
        \psarc{<-}{.4}{-10}{70}%
        \MyBox{.5}{.4}%
        }}%
    \advance\CurX by .5\p@
  \or % left
    \advance\CurX by -.5\p@
    \rput[b](\strip@pt\CurX,\strip@pt\CurY){%
      \rnode[b]{#1}{%
        \psline(0,0)(.5,.4)%
        \psarc{<-}{.4}{-10}{70}%
        \MyBox{.5}{.4}%
        }}%
  \fi
}

\def\Battery#1{%
  \message{[Battery] #1}\ShowXY
  \relax
  \ifcase\Cir@direction % right
    \rput[r](\strip@pt\CurX,\strip@pt\CurY){%
      \rnode{#1}{%
        \psline(0,-.4)(0,.4)%
        \psline(.2,-.2)(.2,.2)%
        \MyBox{.2}{.8}%
        }}%
    \advance\CurX by .2\p@
  \or % left
    \advance\CurX by -.2\p@
    \rput[r](\strip@pt\CurX,\strip@pt\CurY){%
      \rnode{#1}{%
        \psline(0,-.4)(0,.4)%
        \psline(.2,-.2)(.2,.2)%
        \MyBox{.2}{.8}%
        }}%
  \or % up
    \advance\CurY by .2\p@
    \rput[b](\strip@pt\CurX,\strip@pt\CurY){%
      \rnode{#1}{%
        \psline(.1,.2)(.9,.2)%
        \psline(0.3,0)(0.7,0)%
        \MyBox{1}{.2}%
      }}%
  \or % down
    \rput[b](\strip@pt\CurX,\strip@pt\CurY){%
      \rnode{#1}{%
        \psline(-.4,0)(.4,0)%
        \psline(-.2,-.2)(.2,-.2)%
        \MyBox{1}{.2}%
        }}%
    \advance\CurY by -.2\p@
  \fi
}

\def\Resistor{\message{[Resistor]}\ShowXY
  \@ifnextchar[{\@ResInd}{\@ResInd[1]{pszigzag}}}
\def\Inductor{\message{[Inductor]}\ShowXY
  \@ifnextchar[{\@ResInd}{\@ResInd[1]{pscoil}}}

\def\@ResInd[#1]#2#3{%
  \ifcase\Cir@direction % right
    \rput[l](\strip@pt\CurX,\strip@pt\CurY){%
      \rnode{#3}{%
        \csname #2\endcsname[coilarm=.01,coilwidth=.3](0,.15)(#1,.15)%
        \MyBox{#1}{.3}%
        }}%
    \advance\CurX by #1\p@
  \or % left
    \advance\CurX by -#1\p@
    \rput[l](\strip@pt\CurX,\strip@pt\CurY){%
      \rnode{#3}{%
        \csname #2\endcsname[coilarm=.01,coilwidth=.3](0,.15)(#1,.15)%
        \MyBox{#1}{.3}%
        }}%
  \or % up
    \rput[b](\strip@pt\CurX,\strip@pt\CurY){%
      \rnode{#3}{%
        \csname #2\endcsname[coilarm=.01,coilwidth=.3](.15,0)(.15,#1)%
        \MyBox{.3}{#1}%
        }}%
    \advance\CurY by #1\p@
  \or % down
    \advance\CurY by -#1\p@
    \rput[b](\strip@pt\CurX,\strip@pt\CurY){%
      \rnode{#3}{%
        \csname #2\endcsname[coilarm=.01,coilwidth=.3](.15,0)(.15,#1)%
        \MyBox{.3}{#1}%
        }}%
  \fi
}

\pagestyle{empty}

\begin{document}
\TeXtoEPS

\makeatother

\begin{pspicture}(-0.3,0)(8.4,2.8)
  \SetX{1}
  \Up{1}
  \Battery{A}
  \Up{1}
  \Right{2}
  \Resistor{B}
  \Right{1}
  \Down{.3}
  \Inductor{C}
  \Down{.5}
  \Left{1}
  \Switch{D}
  \ncangle[angleA=90,angleB=180,armB=0]{A}{B}
  \ncangle[angleA=0,angleB=90,armB=0]{B}{C}
  \ncput[ref=l]{~~~$i=i_{\mbox{max}}(1-w^{-t/3})$}
  \ncangle[angleA=-90,armB=0,angleB=0]{C}{D}
  \ncangle[angleA=180,armB=0,angleB=-90]{D}{A}
  \nput{180}{A}{10V}
  \nput{90}{B}{R}
  \nput{0}{C}{3mH}
  \nput{270}{D}{S}
\end{pspicture}

\endTeXtoEPS
\end{document}

% Author: Henrik Bengtsson, hb@maths.lth.se
% Date  : 2001-10-08

pstricks-4-10-10.ps, pstricks-4-10-10.tex [4095 bytes]

pstricks-4-6-26.tex

% PSTricks: Wheels
\documentclass{article}
\usepackage{pst-all}  % PSTricks



\newcounter{CtA}
\newcounter{CtB}

\newcommand{\Wheel}[3]{{%
  \color{black}
  \psset{unit=#2}
  \begin{pspicture}(-1,-1.2)(1,1.2)
    \SpecialCoor
    \degrees[#1]
    \multido{\ia=1+1}{#1}{%
      \setcounter{CtA}{\ia}%
      \stepcounter{CtA}%
      \setcounter{CtB}{#1}%
      \addtocounter{CtB}{-\ia}%
      \multido{\ib=\value{CtA}+1}{%
        \value{CtB}}{#3(1;\ia)(1;\ib)}}
    \multido{\i=1+1}{#1}{%
      \rput(1;\i){%
        \pscirclebox[fillstyle=solid,fillcolor=white]{\footnotesize\i}}}
  \end{pspicture}}}% end of newcommand


\pagestyle{empty}

\begin{document}
\TeXtoEPS

{%
 \color{white}
 \fbox{\Wheel{3}{1.2}{\psline}
 \Wheel{5}{1.2}{\psline}}
 \psset{arcangle=10}
 \fbox{\Wheel{12}{3}{\pcarc[linecolor=blue]}}
}

\endTeXtoEPS
\end{document}

% Author: Henrik Bengtsson, hb@maths.lth.se
% Date  : 2001-10-08

pstricks-4-6-26.ps, pstricks-4-6-26.tex [909 bytes]

pstricks001.tex

% PSTricks: Text along a curving line
\documentclass{article}
\usepackage{pst-all} % PSTricks

\pagestyle{empty}

\begin{document}
\TeXtoEPS

\begin{pspicture}(-4,-3.2)(3,0.2)
  \psset{linecolor=lightgray}
  \pstextpath{\pscurve(-4,-2)(-2,0)(0,-3)(2,-1)(3,-2)}
             {\color{blue}
              If you want to type $3 \int^x_y = \sum^{n=1}_{33}$
              and let it follow along a curving line  \ldots}
\end{pspicture}

\endTeXtoEPS
\end{document}

% Author: Henrik Bengtsson, hb@maths.lth.se
% Date  : 2001-10-08

pstricks001.ps, pstricks001.tex [526 bytes]

pstricks003.tex

% PSTricks: Orange graded box
\documentclass{article}
\usepackage{pst-all}  % PSTricks
\usepackage{graphics} % \rotatebox

\newpsobject{showgrid}{psgrid}{subgriddiv=1,griddots=10,gridlabels=6pt}

\pagestyle{empty}

\begin{document}
\TeXtoEPS

\rotatebox{25}{
  \begin{pspicture}(0,0)(3,2)\showgrid
    \psframe[framearc=0.25,fillstyle=gradient,gradangle=30,
             gradbegin=yellow,gradend=red](0.5,0.5)(2.5,1.5)
  \end{pspicture}
}

\endTeXtoEPS
\end{document}

% Author: Henrik Bengtsson, hb@maths.lth.se
% Date  : 2001-10-08

pstricks003.ps, pstricks003.tex [534 bytes]

pstricks004.tex

% PSTricks: Scary Monsters
\documentclass{article}
\usepackage{pst-all}  % PSTricks

\pagestyle{empty}

\begin{document}
\TeXtoEPS

\begin{pspicture}(-1,0)(2,2)
  \begin{psclip}{\psdiamond(1.5,0.2)(2.0,0.5)}
    \huge Scary Monsters
  \end{psclip}
\end{pspicture}

\endTeXtoEPS
\end{document}

% Author: Henrik Bengtsson, hb@maths.lth.se
% Date  : 2001-10-08

pstricks004.ps, pstricks004.tex [359 bytes]

pstricks005.tex

% PSTricks: The Law of Total Probability
\documentclass{article}
\usepackage{pst-all}  % PSTricks

\pagestyle{empty}

\begin{document}
\TeXtoEPS

\psset{xunit=10mm,yunit=10mm}
\begin{pspicture}(0,0)(5,5.5)%\showgrid
  \psframe[linewidth=1pt,framearc=.1,fillstyle=none](0,0)(5,5)
  \rput(0.4,5.3){$\Omega$}
  \psellipse[linewidth=1pt,fillstyle=vlines](2,2.3)(1.5,0.75)
  \rput(2,2.3){\pscirclebox*[framesep=1.5pt]{$B$}}
  \psline[linewidth=1pt](0,3)(2,5)
  \rput(0.6,4.4){$C_1$}
  \psline[linewidth=1pt](1,4)(5,3)
  \rput(3.3,4.3){$C_2$}
  \psline[linewidth=1pt](2,0)(5,2)
  \rput(4.0,2.3){$C_3$}
  \psline[linewidth=1pt](3,3.5)(3,0.6666)
  \rput(3.9,0.6){$C_4$}
  \psline[linewidth=1pt](1.6,1)(3,2.5)
  \rput(2.3,0.9){$C_5$}
  \psline[linewidth=1pt](0,3)(1,2.5)
  \rput(0.7,0.9){$C_6$}
  \psline[linewidth=1pt](1,2.5)(2,3.75)
  \rput(0.9,3.3){$C_7$}
  \psline[linewidth=1pt](1,2.5)(2,0)
  \rput(2.3,3.3){$C_8$}
\end{pspicture}

\endTeXtoEPS
\end{document}

% Author: Henrik Bengtsson, hb@maths.lth.se
% Date  : 2001-10-22

pstricks005.ps, pstricks005.tex [1022 bytes]

pstricks008.tex

% PSTricks: Relative positioning of nodes
\documentclass{article}
\usepackage{pst-node} % PSTricks

\pagestyle{empty}

\begin{document}
\TeXtoEPS

\psset{subgriddiv=0,griddots=5}
\begin{pspicture}(5,5)\psgrid
  \rput(2,4){\circlenode{A}{A}}
  \rput(4,4){\circlenode{B}{B}}
  \ncline{A}{B}

  % M is the middle of (2,4) and (4,4) -> (3,4)
  \ncput{\pnode{M}}
       
  % C is 2 units below M
  \ncput{\rput(0,-2){\circlenode{C}{C}}}

  % Line to a node 2 yunits below the midpoint
  \ncline{M}{C}           
\end{pspicture}

\endTeXtoEPS
\end{document}

% Author   : Adopted from Denis Girou suggestions by Henrik Bengtsson
% Date     : 2001-10-24
% See also : http://tug.org/pipermail/pstricks/2001/000594.html
pstricks008.ps, pstricks008.tex [710 bytes]

pstricks009.tex

% PSTricks: The Law of Total Probability
\documentclass{article}
\usepackage{amsmath}
\usepackage{com.braju.pedigrees}

\begin{document}

\pagestyle{empty}
\TeXtoEPS

\psset{xunit=10mm,yunit=10mm}
\begin{pspicture}(0,0)(5,5.5)%\showgrid
  \psframe[linewidth=1pt,framearc=.1,fillstyle=none](0,0)(5,5)
  \rput(0.4,5.3){$\Omega$}
  \psellipse[linewidth=1pt,fillstyle=vlines](2,2.3)(1.5,0.75)
  \rput(2,2.3){\pscirclebox*[framesep=1.5pt]{$B$}}
  \psline[linewidth=1pt](0,3)(2,5)
  \rput(0.6,4.4){$C_1$}
  \psline[linewidth=1pt](1,4)(5,3)
  \rput(3.3,4.3){$C_2$}
  \psline[linewidth=1pt](2,0)(5,2)
  \rput(4.0,2.3){$C_3$}
  \psline[linewidth=1pt](3,3.5)(3,0.6666)
  \rput(3.9,0.6){$C_4$}
  \psline[linewidth=1pt](1.6,1)(3,2.5)
  \rput(2.3,0.9){$C_5$}
  \psline[linewidth=1pt](0,3)(1,2.5)
  \rput(0.7,0.9){$C_6$}
  \psline[linewidth=1pt](1,2.5)(2,3.75)
  \rput(0.9,3.3){$C_7$}
  \psline[linewidth=1pt](1,2.5)(2,0)
  \rput(2.3,3.3){$C_8$}
\end{pspicture}

\endTeXtoEPS
\end{document}

% Author: Henrik Bengtsson, hb@maths.lth.se
% Date  : 2001-12-03


pstricks009.ps, pstricks009.tex [1044 bytes]

pstricks010.tex

% PSTricks: 3D plot - vector u in W projected onto hyperplane V
\documentclass{article}
\usepackage{pst-all}

\begin{document}

\pagestyle{empty}
\TeXtoEPS

\psset{unit=1mm}
\begin{pspicture}(-3,-25)(71,28)
 % If you change the viewpoint, you might have to update the 
 % plot limits above.
 \psset{viewpoint=1 -1 1}
 \psset{arrowscale=1.5}

 % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 % The W space, i.e. the xyz space:
 % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 \ThreeDput[normal=0 0 1](0,0,0) { % (x,y)-plane
  % The V space, i.e. the xy-plane
  \psframe[fillstyle=solid,fillcolor=lightgray,linecolor=gray](0,0)(50,50)
  % x axis and y axis
  \psline[linecolor=gray]{->}(0,0)(52,0)  \rput(54,0){$w_1$}
  \psline[linecolor=gray]{->}(0,0)(0,52)  \rput(0,54){$w_2$}
 }
 \ThreeDput[normal=1 0 0](0,0,0) { % (y,z)-plane
  % z axis
  \psline[linecolor=gray]{->}(0,0)(0,28) \rput(0,30){$w_3$}
 }
 \rput(15,25){$W$}              % The space W
 \rput(54,-18){$V \subset W$}   % The subspace V of W
 \pscurve[arrowscale=1,linecolor=gray]{->}(53,-15)(48,-9)(44,-12)

 % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 % The vector u in the space W
 % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 \ThreeDput[normal=1 -1 0](10,10,0) { % (y,z)-plane
  \psline[linewidth=0.5,linecolor=black]{->}(0,0)(42.4,30)
  % The right angle between u_{||} and u_{\bot}
  \psline[linecolor=gray]{-}(39.4,0)(39.4,3)(42.4,3)
  % The arc between u and u_{||}
  \SpecialCoor
  \psarc[arcsepB=2pt,linecolor=gray]{-}{8}{0}{36.9}
 }
 \rput(51,24){$\mathbf{u}$}

 % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 % The vector u_{||} in the space V
 % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 \ThreeDput[normal=0 0 1](0,0,0) { % (x,y)-plane
  \psline[linewidth=0.5,linecolor=black]{->}(10,10)(40,40)
 }
 \rput(50,-3){$\mathbf{u}_{||}$}

 % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 % The vector u_{\bot} in the space W \ V
 % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 \ThreeDput[normal=1 0 0](40,40,0) { % (y,z)-plane
  \psline[linewidth=0.5,linecolor=black]{->}(0,0)(0,30)
 }
 \rput(60,20){$\mathbf{u}_{\bot}$}
\end{pspicture}

\endTeXtoEPS
\end{document}

% Author: Henrik Bengtsson, hb@maths.lth.se
% Date  : 2003-02-26
 
pstricks010.ps, pstricks010.tex [2490 bytes]

pstricks011.tex

% PSTricks: Two horizontal trees
\documentclass{article}
\usepackage{pst-all} % PSTricks

\pagestyle{empty}

\begin{document}
\TeXtoEPS 

\psset{labelsep=2pt,tnpos=a,radius=2pt}

% Horizontal tree
\pstree[treemode=R]{\TC*}{%
 \pstree{\TC*~{Pl}}{%
  \pstree{\TC*~{Pl(A)}}{%
   \TC*~{Pr(A)}%
  }
  \pstree{\TC*~{Pr(A)}}{%
   \TC*~{Pl(A)}%
  }
 }
 \pstree{\TC*~{Pl(A)}}{%
  \pstree{\TC*~{Pl}}{%
   \TC*~{Pr(A)}%
  }
  \pstree{\TC*~{Pr(A)}}{%
   \TC*~{Pl}%
  }
 }
 \pstree{\TC*~{Pr(A)}}{%
  \pstree{\TC*~{Pl}}{%
   \TC*~{Pl(A)}%
  }
  \pstree{\TC*~{Pl(A)}}{%
   \TC*~{Pl}%
  }
 }
}


% Horizontal tree with some branched pruned

\def\dedge{\ncline[linestyle=dashed]}

\pstree[treemode=R]{\TC*}{%
 \pstree{\TC*~{Pl}}{%
  \pstree{\TC[edge=\dedge]~{Pl(A)}}{%
   \TC[edge=\dedge]~{Pr(A)}%
  }
  \pstree{\TC*~{Pr(A)}}{%
   \TC*~{Pl(A)}%
  }
 }
 \pstree{\TC*~{Pl(A)}}{%
  \pstree{\TC[edge=\dedge]~{Pl}}{%
   \TC[edge=\dedge]~{Pr(A)}%
  }
  \pstree{\TC*~{Pr(A)}}{%
   \TC*~{Pl}%
  }
 }
 \pstree{\TC*~{Pr(A)}}{%
  \pstree{\TC*~{Pl}}{%
   \TC[edge=\dedge]~{Pl(A)}%
  }
  \pstree{\TC*~{Pl(A)}}{%
   \TC[edge=\dedge]~{Pl}%
  }
 }
}

\endTeXtoEPS
\end{document}

% Author: Henrik Bengtsson, hb@maths.lth.se
% Date  : 2003-03-03

pstricks011.ps, pstricks011.tex [1288 bytes]