Graphics, Figures & TablesHorizontal tree with "gates"

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tropicofvector
Posts: 6
Joined: Thu Aug 19, 2010 10:10 am

Horizontal tree with "gates"

Post by tropicofvector »

Dear all,

I'm looking to create a horizontal tree with "gate" style node connections.

Before starting this post I've performed a forum search and have indeed found this thread: http://www.latex-community.org/forum/vi ... ontal+tree. I've tried fumbling about with PSTricks, qtree, xyling and TIkz but unfortunately to no avail.

My biggest problem at the moment is time, as I'm writing my MA thesis and the deadline is 31 August. I've a good number of pages to write yet and I've lost a lot of time already with testing this and that.

In short, if anybody would be able to point me in the direction of a package that I can use to draw this kind of tree, plus perhaps a simple syntax hint, I'd be extremely grateful.

Please understand, I'm not looking for someone to write me a tailormade solution, just for someone to point me in the right direction so I don't have to start from scratch. From what I've found out qtree won't do, probably xyling won't do either, but I've seen similar things to what I want in TIkz and PSTricks...

Thank you very much in advance!

Btw, I'm using TexLive, Texniccenter (and JabRef) on Windows.

I've attached a PNG with what I wanna do approximately.

Thanks!
horiz_tree_gates.png
horiz_tree_gates.png (14.01 KiB) Viewed 3914 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Horizontal tree with "gates"

Post by frabjous »

Are the examples on p. 374 of the TikZ manual not close enough to what you want? If not, what's wrong with them?
tropicofvector
Posts: 6
Joined: Thu Aug 19, 2010 10:10 am

Horizontal tree with "gates"

Post by tropicofvector »

Problem solved:

Code: Select all

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{trees}

\begin{document}
\begin{tikzpicture}
\node {root}[edge from parent fork right,grow=east]
child {node {left}}
child {node {right}
child {node {child}}
child {node {child}}
};
\end{tikzpicture}
\end{document}
I know I should've had a look at the manual before posting and I did but couldn't find the relevant section you've mentioned. I'm used to a very helpful community for my Linux distro, so I thought I might as well ask here...
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Horizontal tree with "gates"

Post by localghost »

Now that the problem is solved, please mark the topic accordingly as described in Section 3 of the Board Rules.


Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply