[pstricks] pstree labels

Olga Lyashevska olga.mailinglist at herenstraat.nl
Fri Apr 11 15:45:46 CEST 2008


Thank you Martin! It is exactly what I needed.

I have one more question. I would like to add labels above nodes Number,
Feature, etc. I want to have encircled numbers 1,2 etc. I have tried
different kinds of *put, such as \tlput{} but could not figure out why it
doesnt work.

Thank you,
Olga

-----------begin example------------
\documentclass{article}
\usepackage{graphics, graphicx}
\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{pst-node, pst-tree}

\newcommand{\Itemf}[1]{\Tr[ref=l]{%
\psframebox[linestyle=solid,fillstyle=solid]{#1}}}

\begin{document}

\renewcommand{\psedge}{\ncangle}
\psset{xbbd=1.5cm,treemode=R,angleB=180,angleA=-00,levelsep=72pt}
\pstree{\Itemf{Descriptor}} {%
   \pstree{\Itemf{Number}}
   { \pstree{\Itemf{Richness}}
   {{\psset{fillcolor=lightgray}\Itemf{a diversity}}\Itemf{...}}
   \Itemf{...}}
    \pstree{\Itemf{Feature}}
    {\psset{fillcolor=lightgray}\Itemf{Phenotype}\Itemf{Morphology}\Itemf{Gen.
Homology}}
     \pstree{\Itemf{Pattern}}{{\psset{fillcolor=lightgray}\Itemf{Composition}}\pstree{\Itemf{Evenness}}{\psset{fillcolor=lightgray}\Itemf{Frequency}\Itemf{Dispersion}}
          \pstree{\Itemf{Abundance}}{{\psset{fillcolor=lightgray}\Itemf{Rarity}}\Itemf{...}}}
     \pstree{\Itemf{Distance}}{{\psset{fillcolor=lightgray}\Itemf{b
diversity}}\Itemf{...}}
    \pstree{\Itemf{Function}}{\psset{fillcolor=lightgray}\Itemf{Interaction}\Itemf{Process}}%
}

 \end{document}
-------------end example---------------




More information about the PSTricks mailing list