title: In matlab, how do you save a figure as an image in the same way as using "Save As..." in the figure window?
body: <p>When saving a figure, what function does Matlab use? For example, when a user selects File > Save As... and then selects .png or another image format, what is going on behind the scenes? </p>
  
  <p>I am asking because I am trying to automate saving, but when I use <code>saveas</code> or <code>print</code>, the resulting image is really pixelated. However, the image looks really good when I save the figure using the method described above.</p>
  
  <p>What method should I use to save my figure from the command line? The actual method that the figure window uses would work, but if you guys have better solutions, I'd appricate it!</p>