title: Matlab: How to assign different colormaps/colorbars to different surfaces in the same Figure
body: <p>I am fairly new to Matlab and have a few questions.
  I got two surfaces and a plane in the same figure.
  I want to use different colormap and colorbar for b and another colormap and colorbar for c. s is fixed color so it's not a problem.</p>
  
  <p>Let me try to explain what I am trying to achieve:</p>
  
  <p><strong>cmap1=colormap(topobathy)</strong> -->cmap1 is 64x3 double as expected</p>
  
  <p><strong>cmap2=colormap(redwhitegreen)</strong></p>
  
  <p>create cdata1 using cmap1 (this is the first part I cannot figure out, how to scale z data using cmap1, by default CData contains the z values)</p>
  
  <p><strong>b=surf(x,y,z,cdata1)</strong></p>
  
  <p><strong>colorbar</strong> for b using z values</p>
  
  <p><strong>c=pcolor(x,y,(z-z0))</strong> - I want to use cmap2 for this one.</p>
  
  <p><strong>colorbar</strong> for c using (z-z0) values</p>
  
  <p>Here is what I have so far and the problems I encounter</p>
  
  <pre><code>b=surf(x,y,z);
  colormap(topobathy);
  cbar1=colorbar;
  set(get(cbar1,'ylabel'),'String', 'Elevation (m)', 'Rotation', 90)
  hold on;
  s=surf(x,y,z1,'FaceColor',[0.278 0.788 0.788])
  hold on;
  change=z-z0;     
  c=pcolor(x,y,change)
  set(c,'ZData',100 + 0*change); %plotting it above the other surfaces
  colormap(redwhitegreen)`
  </code></pre>
  
  <p>at this point colormap is set to redwhitegreen for b, colorbar of b 
  I can't get the second colorbar with its own clim etc.</p>
  
  <p>I used the freezeColors and cbfreeze explained in this link:
  <a href="http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/">http://blogs.mathworks.com/pick/2009/07/24/using-multiple-colormaps-in-a-single-figure/</a></p>
  
  <p>but one thing works while messing another thing (probably all my fault). I want to learn how to have complete control over my objects without using external m files anyway.</p>
  
  <p>Any help is appreciated.</p>