| Using MATLAB Graphics | Search  Help Desk |
print command obtains default settings by calling the printopt function. You or your system manager can change these default values by editing the file printopt.m, which is found in the toolbox/local directory. If you are working on a multiuser system, you can make a copy of printopt.m and place it on your search path ahead of the MATLAB version.
The syntax for printopt is:
[pcmd,dev] = printopt
pcmd and dev are strings representing the operating-system command for printing and the default device type for your platform. The printing command is the actual operating-system command that MATLAB invokes after it creates the temporary file. The device type is the MATLAB command-line switch used to specify the type of device to format the output for. (If you specify a device in the print command, dev is ignored.)
This table shows the default values for pcmd and dev on each platform.| Platform |
pcmd |
dev |
| MS-Windows (with no default printer specified) |
|
-dwin |
| UNIX (except Silicon Graphics) |
|
|
| Silicon Graphics |
|
|
dev on non-Windows platforms is -dps2, which means MATLAB produces black and white Level 2 PostScript. On Windows systems, the default value for dev is -dwin, which specifies printing through the Windows Print Manager.
printopt.m to change the value of pcmd or dev, enter the command:
edit printoptThis command opens your text editor with the
printopt.m file. Scroll down about 40 lines until you come to this comment line:
%---> Put your own changes to the defaults here (if needed)On the line below this, enter the values you want to use. For example, this line sets the default device type to Level 2 color PostScript:
dev = '-dpsc2';