title: Printing figure at same size as figure window
body: <p>I'm trying to save a figure in PDF format such that I don't get extraneous white space around it, i.e. the figure should be the same size as the figure window. </p>
  
  <p>I'm pretty sure that the way to do it is</p>
  
  <pre><code>figureNames = {'a', 'b', 'c'};
  for i = 1:3
      set(figure(i), 'paperpositionmode', 'auto');
      print(figure(i), '-dpdf', figureNames{i})
  end
  </code></pre>
  
  <p>But it's not working. I'm getting as much white space as ever. Can someone enlighten me as to what's wrong?</p>