Graphics |
Default Settings and How to Change Them
If you have not changed the default print and export settings, MATLAB prints or exports the figure
Setting Defaults for a Figure
In general, to change the property settings for a specific figure, follow the instructions given in the section Changing a Figure's Settings.
Any settings you change with the Page Setup, Print, and Printing Options dialog boxes or with the set
function are saved with the figure and affect each printing of the figure until you change the settings again.
The settings you change with the Figure Copy Template Preferences and Copy Options Preferences panels alter the figure as it is displayed on the screen.
Setting Defaults for the Session
MATLAB enables you to set the session defaults for figure properties. Set the session default for a property using the syntax
where propertyname
is one of the named figure properties. This example sets the paper orientation for all subsequent print operations in the current MATLAB session.
The Figure Properties reference page contains a complete list of the properties.
Setting Defaults Across Sessions
MATLAB enables you to set the session-to-session defaults for figure properties, the print driver, and the print
function.
Print Device and Print Command. Set the default print driver and the default print command in your printopt.m
file. This file contains instructions for changing these settings and for displaying the current defaults. Open printopt.m
in your editor by typing the command
Scroll down about 40 lines until you come to this comment line and make your changes after this line.
For example, to change the default driver, first find the line that sets dev
, and then replace the text string with an appropriate value. So, to set the default driver to HP LaserJet III, modify the line to read
For the full list of values for dev
, see the Drivers section of the print
reference page.
Note
If you set dev to be a graphics format, such as -djpeg , MATLAB
exports the figure rather than printing it.
|
Figure Properties. Set the session-to-session default for a property by including this command in your startup.m
file:
where propertyname
is one of the named figure properties. For example,
keeps the figure background in the screen color.
This is the same command you use to change a session default, except that it executes automatically every time MATLAB is invoked.
Note
Arguments specified with the print command override properties set
using MATLAB commands or the Page Setup dialog box, which in turn
override any MATLAB default settings specified in printopt.m or startup.m .
|
Specifying Parameters and Options | How to Print or Export |
© 1994-2005 The MathWorks, Inc.