title: How to plot only some cells with certain values of an array and others not with matplotlib.pyplot?
body: <p>I have an image that consists of float values and another one that consist only of ones and zeros. I want to plot the second image over the first one, but I only want to plot the ones from the second image. The zeros shall not be plotted.</p>
  
  <p>Ì have tried the following code and I also changed the alpha of y to 1. The problem is, that either the red windows of y are changed from x (alpha of y = 0.5), or one can not even see the plots of x (alpha of y=1).</p>
  
  <pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt
  import numpy as np
  
  x = np.random.random(size=(20,20))
  y = np.random.randint(2, size=(20,20))
  
  fig = plt.figure()
  plt.imshow(x, cmap="Greys", alpha = 0.5)
  plt.imshow(y, cmap="Reds", alpha = 0.5)
  plt.show()
  </code></pre>
  
  <p>How can I only plot the ones of y?</p>
  
  <p>UPDATE:
  Thank you for your answers! But this is not want I am looking for. I will explain again:</p>
  
  <p>The result should be something like: x as background and every position, where y is 1, should be colored pure red.</p>