title: Separate colormap for each subplot in Octave
body: <p>Matlab provides an ability to set individual colormaps for each subplot. The same functionality described by <a href="https://www.gnu.org/software/octave/doc/v4.0.1/Representing-Images.html#XREFcolormaphttp://" rel="nofollow noreferrer">Octave docs</a></p>
  
  <p>Namely following phrases: </p>
  
  <blockquote>
    <p>Function File: cmap = colormap (hax, …)
        If the first argument hax is an axes handle, then the colormap for the parent figure of hax is queried or set. </p>
  </blockquote>
  
  <p>But when I try to run following code, I end up having single colormap for all subplots for some reason. </p>
  
  <pre><code>clear -all;
  clc;
  
  img = zeros(128, 128);
  img(64,64) = 0.2;
  rad = radon(img);
  
  x = 1;
  y = 4;
  
  
  s1 = subplot(y,x,1); imagesc(img);
  colormap(s1, gray);
  s2 = subplot(y,x,2); imagesc(rad);
  colormap(s2, hot);
  colorbar;
  
  line_img = zeros(128, 128);
  line_img(64, 32:64) = 0.5;
  line_img(63, 32:64) = 0.4;
  line_img(63, 32:64) = 0.2;
  line_rad = radon(line_img);
  s3 = subplot(y,x,3); imshow(line_img);
  colormap(s3, gray);
  s4 = subplot(y,x,4); imagesc(line_rad);
  colormap(s4, hot);
  
  colorbar;
  </code></pre>
  
  <p>Any help is appreciated. I expect to have source images in grayscale and radon transform images in "hot". For some reason I'm getting first subplot somewhat like grayscale (it's actually not, since I initialize point with value 0.2 and octave gives me pure white color for it, while I'm expecting reasonably dark gray), and thee remaining images seem to have "hot" colormap being set.</p>