title: Not getting the heatmap in the background using Matplotlib Python
body: <p>I have tried this and got the result as in the image:  </p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  import numpy as np
  from matplotlib.colors import LinearSegmentedColormap
  cmap = LinearSegmentedColormap.from_list("", ["red","grey","green"])
  df = pd.read_csv('t.csv', header=0)
  
  fig = plt.figure()
  ax1 = fig.add_subplot(111)
  ax = ax1.twiny()
  # Scatter plot of positive points, coloured blue (C0)
  ax.scatter(np.argwhere(df['real'] &gt; 0), df.loc[df['real'] &gt; 0, 'real'], color='C2')
  # Scatter plot of negative points, coloured red (C3)
  ax.scatter(np.argwhere(df['real'] &lt; 0), df.loc[df['real'] &lt; 0, 'real'], color='C3')
  # Scatter neutral values in grey (C7)
  ax.scatter(np.argwhere(df['real'] == 0), df.loc[df['real'] == 0, 'real'], color='C7')
  
  ax.set_ylim([df['real'].min(), df['real'].max()])
  index = len(df.index)
  ymin = df['prediction'].min()
  ymax= df['prediction'].max()
  ax1.imshow([np.arange(index),df['prediction']],cmap=cmap,
                          extent=(0,index-1,ymin, ymax), alpha=0.8)
  plt.show()
  </code></pre>
  
  <p>Image:<br>
  <a href="https://i.stack.imgur.com/knvVM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/knvVM.png" alt="output"></a>  </p>
  
  <p>I was expecting one output where the color is placed according to the figure. I am getting green color and no reds or greys.   </p>
  
  <p>I want to get the image or contours spread as the values are. How I can do that? See the following image, something similar:<br>
  <a href="https://i.stack.imgur.com/9hlp2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9hlp2.png" alt="expected output"></a>  </p>
  
  <p>Please let me know how I can achieve this. The data I used is here: <a href="https://gist.github.com/JafferWilson/5a573831a0830172b508246cdfb7691f" rel="noreferrer">t.csv</a><br>
  For a live version, have a look at <a href="http://playground.tensorflow.org" rel="noreferrer">Tensorflow Playground</a></p>