title: Matplotlib Scatter plot filter color (Colorbar)
body: <p>I have some data let say <code>x</code>, <code>y</code>, and <code>z</code>. All are <code>1D</code> arrays. I have done a scatter plot with <code>z</code> as color as;</p>
  
  <pre><code> import matplotlib.pyplot as plt
   plt.scatter(x,y,c=z,alpha = 0.2)
   plt.xlabel("X")
   plt.ylabel("Y")
   plt.ylim((1.2,1.5))
   plt.colorbar() 
  </code></pre>
  
  <p>The <code>z</code> values are normalized and its between <code>-1</code> to <code>1</code>. I have attached the figure below. </p>
  
  <p>The question I have is; How can I filter the colors such that let say the points that have a color value between <code>-0.25</code> to <code>0.25</code> disappear form the figure (i.e set the color to white).  </p>
  
  <p><img src="https://i.stack.imgur.com/dYjkD.jpg" alt="enter image description here">   </p>
  
  <p>The values for <code>x</code>, <code>y</code>, and <code>z</code> can be provided if needed to answer this question. Thank you for your time. </p>