title: Seaborn Heatmap: Move colorbar on top of the plot
body: <p>I have a basic heatmap created using the <code>seaborn</code> library, and want to move the colorbar from the default, vertical and on the right, to a horizontal one above the heatmap. How can I do this?</p>
  
  <p>Here's some sample data and an example of the default:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import seaborn as sns
  import pandas as pd
  import numpy as np
  
  # Create data
  df = pd.DataFrame(np.random.random((5,5)), columns=["a","b","c","d","e"])
  
  # Default heatma
  ax = sns.heatmap(df)
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/HEmiE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HEmiE.png" alt="default heatmap"></a></p>