[pstricks] pstree colored boxes
Martin Chicoine
martin.chicoine at umontreal.ca
Thu Apr 10 17:19:47 CEST 2008
> -----Message d'origine-----
> De : pstricks-bounces at tug.org [mailto:pstricks-bounces at tug.org] De la part
> de Olga Lyashevska
> Envoyé : 10 avril, 2008 10:59
> À : pstricks at tug.org
> Objet : [pstricks] pstree colored boxes
>
> Dear list,
>
> I would like to fill boxes at the end of each branch with a grey color.
> Could you please suggest anything?
>
> Thanks in advance,
> Olga
This works:
\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}}\ps
tree{\Itemf{Evenness}}{\psset{fillcolor=lightgray}\Itemf{Frequency}\Itemf{Di
spersion}}
\pstree{\Itemf{Abundance}}{\Itemf{Rarity}\Itemf{...}}}
\pstree{\Itemf{Distance}}{\Itemf{b diversity}\Itemf{...}}
\pstree{\Itemf{Function}}{\Itemf{Interaction}\Itemf{Process}}%
}
\end{document}
More information about the PSTricks
mailing list