[pstricks] [Fwd: Re: laying out a hierarchical structure diagram]
Herbert Voss
LaTeX at zedat.fu-berlin.de
Thu Jun 29 16:53:16 CEST 2006
-------- Original Message --------
Subject: Re: laying out a hierarchical structure diagram
Date: Thu, 29 Jun 2006 15:10:07 +0200
From: Herbert Voss <Herbert.Voss at gmx.net>
CC: LaTeX Lists <pstricks at tug.org>
Newsgroups: comp.text.tex
References: <r%Cog.57319$Lm5.37655 at newssvr12.news.prodigy.com>
anon k wrote:
> I'm trying to lay out a hierarchical structure diagram that shows how
> subsets relate to their supersets.
>
> One way is to draw it as a tree, graph theory-style, with the words at
> each node. It won't always be a tree, though, because the structures
> that I am depicting are not always very rigorous. (For example see below.)
>
> An ASCII indication of what I'm trying to achieve:
>
> /-- Grasses
> | /-- Pines -----------------\
> | | +-- needle-leaved
> | |-- Oaks --\ |
> | | +-- flat-leaved |
> Plants -+-- Trees ----+-- Elms --/ |
> | | |
> | \-- Spruces ---------------/
> \-- Herbs
\documentclass{minimal}
\usepackage{pstricks,pst-tree}
\begin{document}
\psset{edge={\ncangles[arrows=->,angleB=180]},nodesep=3pt,levelsep=3cm}
\pstree[treemode=R]{\Tr{Plants}}{%
\Tr{Grasses}
\pstree[treemode=R]{\Tr{Trees}}{%
\pstree[treemode=R]{\Tr{Pines}}{\skiplevel{\Tr[name=needle]{needle-leaved}}}
\pstree[treemode=R]{\Tr{Oaks}}{\Tr[name=flat]{flat-leaved}}
\Tr[name=elms]{Elms}
\Tr[name=spruces]{Spruces}
}
\Tr{Herbs}
}
\ncangles[angleB=180]{elms}{flat}
\ncangle[angleB=180,armB=0.5]{spruces}{needle}
\end{document}
Herbert
More information about the PSTricks
mailing list