title: Maintain the same max value in all Y axis in subplots
body: <p>I am using the following piece of code to make a subplot of n cases. I added three to make it easily readable   </p>
  
  <pre><code>for c=1:cols
   subplot(n,cols/n,c)
   labels_x = 1:cols;
   labels_y = 0:max_value;
   data = count_pairs(c,:);
   bar(data,0.2,'grouped','b');
   set(gca,'XTick',labels_x)
   set(gca,'YTick',labels_y)
   xlabel('β')
   title_value = sprintf('Frequencies of %d,β',c);       
   title(title_value);
   hold all;
  end
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/qcnKg.png" alt=" "></p>
  
  <p>The problem is that I am not getting the same maximum value (which is the <code>max_value</code> variable)  on the Y axis and so the graph cannot be interpreted very easily.Plus I am losing a lot of space since β goes up to 10 (lots of white space next to the final bar), even if <code>cols</code> variable equals to 10. Even if I change the <code>0.2</code> value, white space does not get any les. Any ideas? </p>
  
  <p>Thanks in advance!</p>