title: Matlab: Using imagesc in grayscale without black
body: <p>Beginning with a simple 2D matrix m of either 0 or 1 as an example:</p>
  
  <pre><code>m = [ 0 0 0 1 1
        0 1 1 1 0
        1 1 0 0 1
        0 0 0 1 0 ] 
  </code></pre>
  
  <p>How would I get this image to be displayed in a figure as only white and one gray using imagesc()? Currently, my code would is something like this:</p>
  
  <pre><code>imagesc(m)
  colormap(gray)
  colorbar
  </code></pre>
  
  <p>I've experimented with various ways to adjust the colormap and set limits on which values are used with CLim, but I have not found a way to limit the actual colors themselves so that instead of having white and black for values of 0 and 1, we have a white and (light) gray value for 1 and 0, respectively. Any quick and easy ways to do this?</p>
  
  <p>Note: I should also mention that I want these so I can overlay a a contour plot of the same dimensions (but different values) and by using black, so I'm not sure if that would factor into any answers, but I am also open to suggestions with that in mind.</p>