title: Data order in seaborn heatmap from pivot
body: <p>So I have a heatmap created using seaborn</p>
  
  <pre><code>revels = rd.pivot("Flavour", "Packet number", "Contents")
  
  ax = sns.heatmap(revels, annot=True, fmt="d", linewidths=0.4, cmap="YlOrRd")
  
  plt.show()
  </code></pre>
  
  <p>which produces<a href="https://i.stack.imgur.com/xBaN8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xBaN8.png" alt="enter image description here"></a></p>
  
  <p>There are two things which I want to do however, which I can't for the life of me work out how to do, despite consulting seaborn's helpfile (<a href="http://seaborn.pydata.org/generated/seaborn.heatmap.html" rel="noreferrer">http://seaborn.pydata.org/generated/seaborn.heatmap.html</a>)</p>
  
  <p>The thing I want to do is order the flavours differently. Despite the order being inputted in the textfile as orange, toffee, choc, malt, raisin, coffee, it doesn't generate this way when plotting. I tried to edit the yticklabs but that just edits the labels as opposed to moving the data with it.</p>
  
  <p>Thanks for any help</p>
  
  <p>PS data looks like this:</p>
  
  <pre><code>Packet number,Flavour,Contents
  1,orange,4
  2,orange,3
  3,orange,2
  ...
  1,toffee,4
  2,toffee,3
  3,toffee,3
  ...
  etc.
  </code></pre>