title: Python: How do I plot a signal with color-coded values as background?
body: <p>I am a beginner in Python and matplotlib, extensive search did not yield anything useful, so here goes:</p>
  
  <p>I have aquired <code>data</code> (256 samples per seconds) from a device.
  Code below will recreate (and plot) the data set.</p>
  
  <pre><code># Import modules
  import numpy as np
  import matplotlib.pyplot as plt
  # Set variable
  Fs = 256
  # Create list with random measurements
  np.random.seed(1)
  data = [np.random.uniform(-20000, 20000) for i in range(10*Fs)]
  #plt.plot(data, color = "black", linewidth = 0.3); plt.show()
  </code></pre>
  
  <p>For <code>data</code>, I have calculated several values for every second, i.e. 256 data points. Every second is characterized by a set of these numbers.
  Code below will create a data set for 3 of these numbers, called <code>sig_val</code>s.</p>
  
  <pre><code># Create lists with random sig_values with length of 1/Fs of measurements
  sig_vals1 = [np.random.uniform(0, 1) for i in range(int(len(data)/Fs))]
  sig_vals2 = [np.random.uniform(0, 1) for i in range(int(len(data)/Fs))]
  sig_vals3 = [np.random.uniform(0, 1) for i in range(int(len(data)/Fs))]
  </code></pre>
  
  <p><strong>The goal is to have an overlay graph that shows</strong> </p>
  
  <ol>
  <li>heatmap-like color-coded information about the <code>data</code>'s intervals,</li>
  <li>overlayed with the original <code>data</code>.</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/ldJzR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ldJzR.jpg" alt="https://ibb.co/iZcvWk"></a></p>
  
  <p><strong>How do I get a nice plot of color-coded values of <code>sig_vals</code> as background of <code>data</code>?</strong></p>