title: Get levels (contour) of a scalar field (Matplotlib / Python)
body: <p>I'm wondering how can I get the vertices of each level of a contour plot.</p>
  
  <p>For example, I have this plot:</p>
  
  <p><img src="https://i.stack.imgur.com/0ErFS.png" alt="enter image description here"></p>
  
  <p>Which has, I guess, more than 10 levels.</p>
  
  <p>I'm trying to get the vertices of each one of them.</p>
  
  <p>So far, I have this piece of code:</p>
  
  <pre><code>def iso_contours(scalar_fields):
      for scalar_field in scalar_fields:
          cs = plt.contour(scalar_field)
          paths = cs.collections[0].get_paths()
          print len(path)
          for path in paths:
              # Get vertices
  </code></pre>
  
  <p>However, I'm getting just one path. How is the properly way to achieve what I would like to?</p>
  
  <p>Thank you in advance.</p>