Questions tagged [tikz-qtree]

{tikz-qtree} concerns drawing of tree diagrams using the TikZ-qtree package

The tag concerns the TikZ-qtree package which provides enhancements to the tree drawing capability of TikZ. It uses the Qtree syntax in a TikZ environment and complements pst-qtree by making trees available under pdfLaTeX and XeTeX

285 questions
12
votes
1 answer

Positioning labels on edges of tikz-qtree

I'm making a tree in a document with tikz-qtree and I managed to make the tree. I've also added labels to the edges, without any problems. However, the labels appear at the top of the edge, i.e. a lot closer to the parent node than the child node.…
Mythio
  • 2,204
12
votes
2 answers

Draw 5 period binomial tree

I want to draw a 5 period binomial tree. I have found some code for only 3 period. I was trying to extend it to 5 period, but it turned out too messy at the end. I don't want the nodes overlapping. This means if it is 5 period, there are 2^5=32…
user71804
  • 155
9
votes
1 answer

\draw alignment when connecting nodes using tikz-qtree, getting line centered

Here is my code and I will post a picture showing what it generates. I will manually draw in red where I would like to draw a line from. I am producing a family tree and I need to connect lines from one person to another. Could anyone help me get…
8
votes
1 answer

Is there a way to add a text label outside a node in tikz-qtree?

Having text labels inside nodes in trees drawn by tikz-qtree is straightforward, but is it possible to also have a label outside the node? For example, a node with letter A inside it, and letter B outside it on its left/right-hand-side?
7
votes
1 answer

Shrink tikz trees

How can I reduce the overall size of trees drawn by tikz-qtree? I've got a huge parse tree that doesn't even try to fit on one page. I'd like to either resize the full tree or tweak the placing algorithm to make the tree more dense.
6
votes
1 answer

Tikz-Qtree How to Change Position where Edge Connects to Node

I am trying to produce a binary tree using Tikz-qtree, however I am trying to figure out a way to shift my leaf node so that the top of the triangle connects to the edge. I tried using yshift on the node itself, but the edge is still connected to…
Azurite
  • 61
6
votes
1 answer

How to change the color of subtrees in tikz-qtree?

Is there an elegant way to color subtrees in tikz-qtree, without going through each of the respective nodes and edges by hand? The following code example shows the ugly way: \documentclass{standalone} \usepackage{tikz-qtree} …
Timm
  • 899
6
votes
1 answer

How to save space in qtree

Suppose, I have a qtree: \documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree,tikz-qtree-compat} \begin{document} \begin{tikzpicture} \tikzset{ % Define arrow style pil/.style={ ->, thick, shorten…
user4035
  • 5,035
  • 6
  • 40
  • 57
5
votes
1 answer

tikz-qtree and tikz trees not playing nice with each other

I have the following problem: I have tikz with tikz-qtree installed. Hence, if I draw a tree with q-tree it works perfectly. However, I have to recycle one drawing done without q-tree, so that the code…
Alessio
  • 51
5
votes
3 answers

Alter only one branch properties

I have a diagram in tikz-qtree like figure A, but I'd like something like figure B. Is it possible, to alter the properties of only one branch? (these figures were made with Dia and arrows are not important) edit: (added my modified code, based on…
Greg
  • 111
5
votes
2 answers

Leaf nodes in tikz-qtree are not aligned with parents when using grow=left

I am building a rotated tree using tikz-qtree. Whenever i use the setting "grow=left", the leaf nodes will be shifted a constant distance compared to their parent nodes, so that the lines between them aren't vertical. This does not seem dependent on…
5
votes
1 answer

Edge label distance from edge in TikZ-qtree

I'm making a tree using TikZ-qtree, and I need to put labels on my edges. Right now it looks something like this: \begin{tikzpicture} \Tree [.$\alpha$ \edge node[left, pos=.2]{\scriptsize $p$}; [.\phantom{$\beta$} ] …
4
votes
1 answer

tikz-qtree: edge overlaps with nodes

I'm drawing a tree using the tikz-qtree package. There is a lot of text in the nodes. I'm finding it difficult to get the edges to meet the edge of the nodes. For some nodes with lots of text, the edge goes too far. Code…
4
votes
3 answers

Align levels in a tree using tikz-qtree

I'd like all levels in my tree diagram to be aligned vertically. The problem is that some branches 'skip' a level. Specifically, all x's and all C's should be next to each other (the rest is fine as it is). I managed to to this for the x's by…
Max
  • 117
  • 7
4
votes
1 answer

On this tikz-qtree when I color the nodes the parent node gets covered. How to fix it?

\documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \usetikzlibrary{trees} % this is to allow the fork right path \pagecolor{olive!50!yellow!50!white} \begin{document} \begin{tikzpicture}[level distance=1.25in,sibling…
Reza
  • 811
1
2 3