title: matplotlib - extracting values from contour lines
body: <p><a href="https://stackoverflow.com/questions/5666056/matplotlib-extracting-data-from-contour-lines">This question/answer pair</a> shows how to extract vertices from contour plot:</p>
  
  <pre><code>p = cs.collections[0].get_paths()[0]
  v = p.vertices
  x = v[:,0]
  y = v[:,1]
  </code></pre>
  
  <p>But how to get the value (i.e <code>z</code> for an elevation model) for each path?</p>