title: Scaling MATLAB/Octave plot so that all the labels can be printed properly
body: <p>I am trying to create a simple heatmap using MATLAB/Octave:
  <img src="https://i.stack.imgur.com/0iDFE.png" alt="Heatmap plot">
  <br/>
  As you can see I have a lot of rows, each of which represents a separate category. </p>
  
  <p>I am using the <code>imagesc</code> function and I would like to be able to scale the image/plot so that each of the y-axis labels could be printed properly (instead of having the mess that can be seen in the image below).</p>
  
  <p>Here is a sample code that I would like to modify:</p>
  
  <pre><code>A = randi(100, 200, 3);
  imagesc(A, limit = [0, 100]);
  set(gca, 'xtick', [1:3]);
  set(gca, 'xticklabel', { "1,000", "2,000", "3,000" });
  set(gca, 'ytick', [1:200]);
  </code></pre>
  
  <p>Edit: I am attaching the solution to the proposed problem, reached thanks to EitanT's advice as well as the useful information at <a href="http://nibot-lab.livejournal.com/73290.html?nojs=1" rel="noreferrer">http://nibot-lab.livejournal.com/73290.html?nojs=1</a>:</p>
  
  <pre><code>paperWidth = 16.5;
  paperHeight = 11.7;
  
  set(gcf, 'Position', get(0,'Screensize'));
  set(gcf, 'PaperUnits', 'inches');
  set(gcf, 'PaperSize', [paperHeight paperWidth]);
  set(gcf, 'PaperPositionMode', 'manual');
  set(gcf, 'PaperPosition', [0 0 paperWidth paperHeight]);
  set(gcf, 'renderer', 'painters'); figure(gcf);
  
  A = randi(100, 200, 3);
  imagesc(A, limit = [0, 100]);
  set(gca, 'FontSize', 5);
  set(gca, 'FontWeight', 'light');
  set(gca, 'xtick', [1:3]);
  set(gca, 'xticklabel', { "1,000", "2,000", "3,000" });
  set(gca, 'ytick', [1:200]);
  </code></pre>