Graphics, Figures & TablesPstree wrong labeling

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
texer
Posts: 2
Joined: Fri Jan 08, 2010 2:21 pm

Pstree wrong labeling

Post by texer »

Dear NG,

my Latex Kung Fu can not help me with the following (supposed very simple) problem.
I also searched this forum but did not find a solution.

Attatched is a code for a pstree figure.
My own tree is a bit more complex, so I decided to try a simple exmaple from a textbook.
Even this simple code does not work as it should.
My version of Latex places the labels, that were supposed to label the lines in the tree, at the position of the nodes.
So the node's text is shown and on top of the node's text the text of the edge label is written.

What am I doing wrong?
Can I work around this issue by renecommanding some commands?

Thanks a lot for any help,
Juergen

\psset{levelsep=3cm}
\begin{pspicture}
\psset{tpos=.6}
\renewcommand{\psedge}{\ncline\ncput{test}}
\rput[bl](0,0)(4,3.5){
\pstree[treemode=R]{\Toval{root}}{%
\Tcircle{1} \taput*{test}
\TCircle{2} ^{test}
}
}
\end{pspicture}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

texer
Posts: 2
Joined: Fri Jan 08, 2010 2:21 pm

Re: Pstree wrong labeling

Post by texer »

Update:

After spending half the day on this problems, googeling and reading a lot of tips, I finally found somewhere, that my issue could be a problem of the viewer.
So I tried another viewer and the tree is shown correctly...

So, everything works fine now, sorry for the stupid question!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Pstree wrong labeling

Post by localghost »

Just for notification.
  • Always post complete and compilable examples instead of useless code snippets.
  • Always use the code environment for longer pieces of source code. It keeps a post clear and legible.
Presumably you looked at the result with a DVI viewer. Most DVI viewers cannot display the Postscript code correctly. So you should always compile your document to PS or PDF as the final output format.


Best regards and welcome to the board
Thorsten
Post Reply