7

How do I draw a tree upside down in qtree?

So root at the bottom and leaves at the top.

Werner
  • 603,163
Zi Wang
  • 73
  • 1
  • 4

1 Answers1

8

This cannot easily be done with qtree. However, it can be done with tikz-qtree and the syntax for specifying the trees is essentially identical, except for additions thanks to TikZ.

Page two in the manual should solve your problem.

The grow=direction and grow'=direction options control the orientation of trees just as for standard TikZ trees. However, direction must be one of up, down, left, or right. The difference between grow and grow' is that grow places children counterclockwise with respect to their parent and grow' places them clockwise:

\begin{tikzpicture}[grow'=up]
            \Tree [.NP [.Adj upside-down ] [.N tree ] ]
\end{tikzpicture}

enter image description here

cfr
  • 198,882
Ray
  • 682
  • 1
  • 4
  • 13
  • 1
    You're welcome! Make sure to mark your question as solved when this answer solved your problem. – Ray Apr 22 '12 at 16:39
  • It might help to mention @ZiWang like this to get attention from him. Otherwise he might not see your comment. BTW: nice answer (+1) – topskip Apr 22 '12 at 17:20
  • 2
    Just to be fair, tikz-qtree and qtree are different packages; you can't easily draw a tree upside down in regular qtree, so if Zi Wang was using the latter, he couldn't have found the answer in the manual. – Alan Munn Apr 22 '12 at 17:28