Using MATLAB Graphics     Search    Help Desk 

Changing Default Print Settings

The 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 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)
COPY /B %s default_printer
COPY /B %s LPT1:
-dwin
UNIX (except Silicon Graphics)
lpr -r -s
-dps2
Silicon Graphics
lp
-dps2

As the table shows, the default value for 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.

Editing printopt.m

If you want to edit printopt.m to change the value of pcmd or dev, enter the command:

This command opens your text editor with the printopt.m file. Scroll down about 40 lines until you come to this comment line:

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:



[ Previous | Help Desk | Next ]