[pstricks] pstree labels

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri Apr 11 20:51:00 CEST 2008


Olga Lyashevska schrieb:
> 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.

Olga,
use the name option, see lines with %%%%%

Herbert

\documentclass{article}
\usepackage{pst-tree}
\SpecialCoor

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

\begin{document}

\renewcommand{\psedge}{\ncangle}
\psset{xbbd=1.5cm,treemode=R,angleB=180,angleA=-00,levelsep=72pt}
\pstree{\Itemf{Descriptor}} {%
 
\pstree{\Itemf{Number}\uput{15pt}[45](none){\red\textcircled{A}}}%%%%%%%%%%%%%
    { \pstree{\Itemf{Richness}}
    {{\psset{fillcolor=lightgray}\Itemf{a diversity}}\Itemf{...}}
    \Itemf{...}}
 
\pstree{\Itemf[F]{Feature}\uput{20pt}[-45](F){\textcolor{blue}{A}}}%%%%%%%%%%%%
 
{\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}




More information about the PSTricks mailing list