title: Create a colormap that is assigned to specific integer values with numpy/scipy
body: <p>I am looking for  way to create a colormap in python/matplotlib that is specific to a designated integer value and remains that integer value. Here is an example of how I define the matlab colormap:</p>
  
  <pre><code>c_map = [1   1   1;...     % Integer assignment = 0 - Air - white
           0.6 1 0.8;... % Integer assignment = 1 - Water - cyan
           1 0.6 0.2];   % Integer assignment = 2 - Sediments - orange
  </code></pre>
  
  <p>it is later called during the plotting routine by: </p>
  
  <pre><code>colormap(c_map);
  pcolor(xvec,zvec,ColorIntegers);
  shading interp, colormap, caxis([0 3]), axis ij
  </code></pre>
  
  <p>The integer values always stay the same (i.e., Air = 0 , Water = 1, sediments = 2).</p>
  
  <p>I've scoured the matplotlib documentation and stack, but haven't found a way to create this specific style colormap, which relates corresponding integers to a color. Most questions deal with diverging, jet, centering, linear, non-linear as opposed to a consistent coloring of specific colormaps. Each color <strong><em>must</em></strong> correspond to that <strong><em>specific</em></strong> integer value. </p>
  
  <p>Any help will be appreciated, thank you in advance.</p>