title: Pruning dendrogram at levels in Scipy Hierarchical Clustering
body: <p>I have lot of data points which are clustered in the following way using <code>Scipy</code> Hierarchical Clustering. Let's say I want to prune the dendogram at level '1500'? How to do that? (I've tried using 'p' parameter and that is not what I'm expecting)</p>
  
  <pre><code>Z = dendrogram(linkage_matrix,
             truncate_mode='lastp',
             color_threshold=1,
             labels=df.session.tolist(),
             distance_sort='ascending')
  
  
  plt.title("Hierachical Clustering")
  plt.show()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Q9ZPL.png" alt="Results"></p>