title: Reading and plotting VTK file data structure with python
body: <p>I have a VTK file (unstructured grid) with <code>points</code> and <code>cells</code>.</p>
  <p>I can import the file and read it into using the <a href="https://github.com/nschloe/meshio/" rel="nofollow noreferrer">meshio</a> python package.</p>
  <p>If I type the command <code>mesh.cells</code> I see a dictionary called <code>'hexahedron'</code> with an array made up of lists inside like this:</p>
  <pre><code>{'hexahedron': array([[  0, 162, 185, ..., 163, 186,  23],
          [162, 329, 351, ..., 330, 352, 186],
          [329, 491, 514, ..., 492, 515, 352],
          ...,
          [483, 583, 600, ..., 584, 601, 490],
          [583, 650, 656, ..., 651, 657, 601],
          [650, 746, 762, ..., 747, 763, 657]])}
  </code></pre>
  <p>I would like to plot this in matplotlib (I know ParaView is an alternative, which I've been using, but I would also like to use matplotlib for this at the moment). Anyways, I'm having trouble wrapping my head around the structure.</p>
  <p>There are 8 data points in each list.</p>
  <p>If I run the command <code>mesh.points</code> I get an array of lists of <code>x, y, z</code> coordinates, which makes sense. However, with the hexahedron, are there also <code>x, y, z</code> coordinates in the list? It would make more sense if there were lists of <code>x, y, z</code> coordinates, as that would make up polygons.</p>
  <p><a href="https://stackoverflow.com/questions/45020452/how-does-paraview-read-a-vtk-file">I've seen this thread</a>, but I'm still stuck on understanding this.</p>
  <p><a href="https://www.dropbox.com/s/b27380kei86jer4/proc000000_mesh.vtk?dl=0" rel="nofollow noreferrer">Attached is the VTK file</a>, as well as what it looks like in ParaView. Thanks!
  <a href="https://i.stack.imgur.com/MSMu8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MSMu8.png" alt="screenshot from paraview, bar with three bands of different colour" /></a></p>