Skip to content

Instantly share code, notes, and snippets.

dahoo/dendrogram.tex Last active May 29, 2019

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 commented Jul 8, 2015

 looks like:

Pierre-Sassoulas commented Jun 30, 2017

 This require \usetikzlibrary{arrows}

jendrikw commented May 29, 2019

 If you use \coordinate instead of \node, you don't need the .center.
to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.