Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Hierarchical Clustering Dendrogram in Latex
\begin{tikzpicture}[sloped]
\node (a) at (-6,0) {a};
\node (b) at (-3,0) {b};
\node (c) at (-0.5,0) {c};
\node (d) at (0.5,0) {d};
\node (e) at (2,0) {e};
\node (ab) at (-4.5,3) {};
\node (cd) at (0,1) {};
\node (cde) at (1,2) {};
\node (all) at (-1.5,5) {};
\draw (a) |- (ab.center);
\draw (b) |- (ab.center);
\draw (c) |- (cd.center);
\draw (d) |- (cd.center);
\draw (e) |- (cde.center);
\draw (cd.center) |- (cde.center);
\draw (ab.center) |- (all.center);
\draw (cde.center) |- (all.center);
\draw[->,-triangle 60] (-7,0) -- node[above]{distance} (-7,6);
\end{tikzpicture}
@WillyWinkel

This comment has been minimized.

Show comment Hide comment
@WillyWinkel

WillyWinkel Jul 8, 2015

looks like:
Image of dendogram

looks like:
Image of dendogram

@Pierre-Sassoulas

This comment has been minimized.

Show comment Hide comment
@Pierre-Sassoulas

Pierre-Sassoulas Jun 30, 2017

This require \usetikzlibrary{arrows}

This require \usetikzlibrary{arrows}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment