Graphics    

Printing Problems

Printer Drivers

I'm using a Windows printer driver and have been encountering problems such as segmentation violations, general protection faults, application errors, and unexpected output.   

Try one of the following solutions:

When I use the print function with the -deps switch, I receive this error message.   

As the error message indicates, your figure was saved to a file. EPS is a graphics file format and cannot be sent to a printer using a printer driver. To send your figure directly to a printer, try using one of the PostScript driver switches. See the table of drivers in the print reference page. To print an EPS file, you must first import it into a word processor or other software program.

Default Settings

My printer uses a different default paper type than the MATLAB default type of "letter." How can I change the default paper type so that I won't have to set it for each new figure?.   

You can set the default value for any property by adding a line to startup.m. Adding the following line sets the default paper type to A4.

In your call to set, combine the word Default with the name of the object Figure and the property name PaperType.

I set the paper orientation to landscape, but each time I go to print a new figure, the orientation setting is portrait again. How can I change the default orientation so that I won't have to set it for each new figure?.   

See the explanation for the question above. Adding the following line to startup.m sets the default paper orientation to landscape.

Line Style

My figure contains lines that use broken line styles. However, these lines print as solid lines.   

Microsoft Windows 98 does not support broken line styles for lines whose width is greater than 1 pixel. Unfortunately, most printers produce lines more than 1 pixel thick. So in most cases, Windows 98 drivers produce solid lines, regardless of the setting of LineStyleOrder.

There are various ways you can work around this problem:

Color vs. Black and White

I want the lines in my figure to print in black, but they keep printing in color.   

You must be using a color printer driver. You can specify a black-and-white driver using the print function or the Page Setup dialog box to force the lines for the current figure to print in black. See Setting the Line and Text Color for instructions.

A white line in my figure keeps coming out black when I print it.   

There are two things that can cause this to happen. Most likely, the line is positioned over a dark background. By default, MATLAB inverts your background to white when you print, and changes any white lines over the background to black. To avoid this, retain your background color when you print. See Setting the Background Color.

The other possibility is that you are using a Windows printer driver and the printer is sending inaccurate color information to MATLAB. See Correcting Color Results with Windows Drivers.

I am using a color printer, but my figure keeps printing in black and white.   

By default, MATLAB uses a black-and-white printer driver. You need to specify a color printer driver. For instructions, see Choosing a Printer Driver. If you are already using a Windows color driver, the printer may be returning inaccurate information about its color property. See Correcting Color Results with Windows Drivers.

Printer Selection

I have more than one printer connected to my system. How do I specify which one to print my figure with? .   

You can use either the Print dialog box, or the MATLAB print function, specifying the printer with the -P switch. For instructions using either method, see Selecting the Printer.

Rotated Text

I have some rotated text in my figure. It looks fine on the screen, but when I print it, the resolution is poor.   

You are probably using bitmapped fonts, which don't rotate well. Try using TrueType fonts instead.

ResizeFcn Warning

I get a warning about my ResizeFcn being used when I print my figure.   

By default, MATLAB resizes your figure when converting it to printer coordinates. Therefore, MATLAB calls any ResizeFcn you have created for the figure and issues a warning. You can avoid this warning by setting the figure to print at screen size.


  Troubleshooting Exporting Problems