title: Adding symbols to dendrogram leaves in R
body: <p>I would like to add symbols to the leaves of a dendrogram reflecting variable for sites on a dendrogram similar to this:</p>
  
  <pre><code>require(graphics)
  
  hc &lt;- hclust(dist(USArrests[1:5,]), "ave")
  plot(hc)
  plot(hc, hang = -1)
  
  USArrests[1:5,]
  
             Murder Assault UrbanPop Rape
  Alabama      13.2     236       58 21.2
  Alaska       10.0     263       48 44.5
  Arizona       8.1     294       80 31.0
  Arkansas      8.8     190       50 19.5
  California    9.0     276       91 40.6    
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/RPryX.png" alt="enter image description here">    </p>
  
  <p>Thanks for any suggestion on how to go about this</p>
  
  <p>SOLUTION
  Following Backlin's helpful suggestions I use the following solution</p>
  
  <pre><code>require(graphics)
  
  hc &lt;- hclust(dist(USArrests[1:5,]), "ave")
  
  plot(hc, hang = -1, xlab="", sub="")
  
  col.circle=c("yellow", "red")[cut(USArrests$Murder[hc$order], c(8,10,15))]
  
  symbols(1:5, rep(-25, 5), circles=rep(1, 5), add=TRUE, inches=.2,bg=col.circle, xpd=TRUE)
  
  col.square=c("blue", "green")[cut(USArrests$Assault[hc$order], c(100,200,300))]
  
  symbols(1:5, rep(-35, 5), squares=rep(1, 5), add=TRUE, inches=.4,bg=col.square, xpd=TRUE)
  
  legend(3.7,85,legend=c("Murder 8-10","Murder 10-15","Assualt 100-200","Assualt 200-300"),fill=c("yellow","red","blue","green"))
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/QJQZO.png" alt="enter image description here"></p>