[Tex/LaTex] How to draw up a hierarchical tree diagram for taxonomic classification

diagramstrees

Please show me the most simple, elegant code for this:

enter image description here

How to do it in other words.

Best Answer

You can do this sort of tree easily with the tikz-qtree package:

In the code below, the labels are created using a tree with branches that are not actually drawn (using a style blank which sets [draw=none]). This ensures that they line up with the levels of the main tree. By putting two trees as nodes in a matrix we achieve a reasonable separation between the labels and the main tree.

\documentclass{article}
\usepackage{tikz-qtree}
\begin{document}
\tikzset{edge from parent/.style=
{draw, edge from parent path={(\tikzparentnode.south)
-- +(0,-8pt)
-| (\tikzchildnode)}},
blank/.style={draw=none}}
\begin{tikzpicture}
\matrix
{
\node{\Tree
    [.Class  \edge[blank]; 
    [.Order  \edge[blank];
    [.Family \edge[blank]; 
    [.Genus ]]]]};
&
\node{\Tree 
 [.{$\gamma$-proteobacteria} 
    [.Alteromonadales 
        [.Alteromonadaceae  {Glaciecola}  Alteromonas Agarivorans ] ]
    [.Vibrionales [.Vibrionacae Vibrio ]]]};\\
};           
\end{tikzpicture}

\end{document}

output of code