title: Matlab figure size formatting for Word
body: <p>I'm trying to create MATLAB figures to put into a paper. The paper has very specific sizing instructions for figures that I'm having trouble matching in MATLAB. The figures need to be no greater than 3.5" width, >300 DPI, with 8pt font.</p>
  
  <p>In my code, I use the following to try to set the parameters:</p>
  
  <pre><code>set(gcf,'PaperUnits','inches');
  set(gcf,'PaperPosition',[0 0 3.5 3.5]);
  xlabel('x-axis label','FontSize',8);ylabel('y-axis label','FontSize',8);
  set(gca,'FontSize',8);
  print('-djpeg','-r300','filename.jpg')
  </code></pre>
  
  <p>This should be giving me a 300 DPI, 3.5"x3.5" JPEG image with an 8pt font size. However, when I import the image into Word, it becomes 6.5" x 6.5" and the font size is larger than Word's 8pt font. Even if I resize the image, the font size is still too large, though it should maintain the same DPI. Are the FontSize and PaperPosition parameters not working as I expect they should or is Word doing something strange for importing?</p>