title: How to change node labels of dendrogram plot
body: <p>I did a hierarchical cluster for a project. 
  I have 300 observations each of 20 variables.
  I indexed all the variables so that each variable is between 0 and 1, a larger value being better.</p>
  
  <p>I used the following code to create a cluster plot.</p>
  
  <pre><code>d_data &lt;- dist(all_data[,-1])
  d_data_ind &lt;- dist(data_ind[,-1])
  hc_data_ind &lt;- hclust(d_data_ind, method = "complete")
  dend&lt;- as.dendrogram(hc_data_ind)
  plot(dend)
  </code></pre>
  
  <p>Now the labels of the nodes are in row names, the numbers 1 to 300 (see top pic). During the analysis, I removed the first column of the data frame which is labeled "geography" (see bottom pic), because they were city names in text and would screw up the analysis. But I <strong><em>really</em></strong> need to get the city names on the cluster plot in their right spots, because I need to choose a list of cities based on the results. </p>
  
  <p>What code should I write to insert the city names in the "geography" column into this plot, corresponding to their row names?</p>
  
  <p>As you can see from the data frame (bottom pic), all the city names are in alphabetical order, neatly in ascending order, just like the row names. I'm sure it isn't hard to put the city names onto the plot, I just can't find it by googling and asking around.</p>
  
  <p><a href="https://i.stack.imgur.com/wmjgN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wmjgN.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/XA5P1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XA5P1.png" alt="How to alter the label of the nodes? Right now it&#39;s numbers but I need them to be cities."></a></p>
  
  <p><a href="https://i.stack.imgur.com/gQpiu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gQpiu.png" alt="enter image description here"></a></p>