[pstricks] pstree docs
Herbert Voss
LaTeX at zedat.fu-berlin.de
Mon Jul 11 16:11:03 CEST 2005
Manjusha Joshi wrote:
>>>I read it. But I have few questions. At least is it possible to get some
>>>name with weighted nodes?
>>>I want to put some number inside node and also want to put some name
>>>outside node (and not with path) is it possible?
>>
>>sorry, I don not really understand what you mean.
>>Give an image which shows that behaviour.
>
>
> Here I am adding full code which shows what I want to draw.
>
> In this fig. you can observe, A, B, C,. Labels out side nodes.
> I am using it with \uput command. Which I think not the natural pstricks way.
> But just an adjustment.
> Right now, picture is coming as I want. But if I add the same one in tex file
> with \input fig.tex command. What I added with \uput get misplaced a little.
> And again I need to change arguments(polar coordinates) with \uput command.
use the name option
Herbert
\documentclass[a4paper,10pt]{article}
\usepackage{pstricks,pst-node,pst-tree}
\SpecialCoor
\begin{document}
\pstree[]{\Toval[name=A]{$\delta=0$}}{%
\pstree{\Toval[name=B]{$\delta=w_1$}\tlput{$x_1=1$}}{%
\pstree{\Toval{$\delta=w_1+w_2$}\tlput{$x_2=1$}}
{\Tr{$~\vdots~$}\Tr{$~\vdots~$}}
\pstree{\Toval{$\delta=-w_1-w_2$}\trput{$x_2=0$}}
{\Tr{$\vdots$}\Tr{$~\vdots~$}}
}%
\pstree{\Toval[name=C]{$\delta=-w_1$}\trput{$x_1=0$}}{%
\pstree{\Toval{$\delta=-w_1+w_2$}\tlput{$x_2=1$}}
{\Tr{$\vdots$}\Tr{$~\vdots~$}}
\pstree{\Toval{$\delta=w_1-w_2$}\trput{$x_2=0$}}{%
\Tr{$~\vdots~$}\Tr{$~\vdots~$}}}
}
%
\uput{1cm}[180](A){{A}}%%node name
\uput{1cm}[180](B){{B}}
\uput{1.2cm}[0](C){{C}}
\end{document}
More information about the PSTricks
mailing list