Automatically maximize a figure upon creation

Post date: Nov 22, 2012 9:34:03 PM

If you wish to save your figure using print(..) or saveas(..), you'd better maximize your figure first before saving them. Otherwise, some details might be missing on the saved figure. In fact, one way around this is to maximize the figure size manually first (e.g., by clicking the maximize button), then save the figure. However, it's much better if we can just maximize the figure upon the creation, that is, to have a command in the program to maximize it. And here is a simple way to do it.

set(gcf, 'Position', get(0,'Screensize')); % Maximize figure.

For more details, please visit this matlab forum.