how to get Region format?

MATLAB: How do I expand the region of a plot saved through hgexport?

  • So I used the command hgexport(gcf, 'figure1.jpg', hgexport('factorystyle'), 'Format', 'jpeg'); on my graph, and I get this weird graph below. Is there a way to auto-save images I generate with Matlab - with all the axes expanded out to full screen, so that all these plots won't be squished together? (I've asked SE at http://stackoverflow.com/questions/18544568/how-to-expand-region-of-a-plot-saved-through-hgexport but they can't find a solution so far)

  • Answer:

    You can change the dimensions of your figure before running hgexport using the PaperPosition setting, e.g. set(gcf, 'PaperPositionMode', 'manual'); set(gcf, 'PaperUnits', 'inches'); set(gcf, 'PaperPosition', [2 1 4 2]); (more details here: http://www.mathworks.com/help/matlab/creating_plots/changing-a-figures-settings.html#f3-137140). From "auto-save" it sounds like you want to use a bitmap format, but another suggestion is that you may have fewer problems with dimensions if you tried exporting to a vector graphics format such as .eps.

Keith Callenberg at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.