How can I change the size and orientation of a hardcopy plot in Matlab?
The size and orientation of hardcopy output from the "print" command can be changed with the Maltab "orient" command. The "orient" command changes the PaperOrientation and PaperPosition properties of the current window, so you must use this command prior to issuing a "print" command.
To get a full-page portrait plot from matlab you should type:
>> orient tall
To get a full-page landscape plot from matlab you should type:
>> orient landscape
To return to the default portrait orientation you should type:
>> orient portrait
The orientation selected will remain in effect for subsequent print commands until another "orient" command is issued.
To print out a smaller version of your graph follow these directions:
>> set(gcf, 'PaperPosition', [0.25 1 8 9])
where the "gcf" refers to the current figure, and the vector consists of the terms:
[ left bottom width height ]
The "left" and "bottom" refer to the distance of the bottom-left corner of the figure from that same corner of the physical print page. You can get the default values by just typing:
>> get(gcf, 'PaperPosition')
and you can set it to the default values by typing:
>> set(gcf, 'PaperPosition', 'default')
You probably do not want to set the size of the graph within the actual Matlab window, as this does not affect the print size.
If you do:
>> set(gca, 'Position', [0.2 0.2 0.8 0.8])
then this will set the size and location of the plot on your graph. The numbers should range from 0,0 (the absolute lower-left corner of your figure window) to 1,1 (the absolute upper-right corner of your figure window). Of course, if you use values like that, various markers and tick labels may get cut off. You can set the default values:
>> set(gca, 'Position', 'default')