Graphics | ![]() ![]() |
Changing the Figure's Settings
This section tells you how to use the Page Setup dialog box or the command line to change:
Using the Printing Options or Document Properties dialog boxes, or the command line, you can also control these settings:
Note See Using Print Dialog Boxes for an overview of the dialog boxes, and From the Command Line for information about the commands and functions you use to change the print settings. |
Examples
These examples show you how to change specific settings from the Windows and the UNIX menus, and from the command line:
Size of the Figure
These properties control the size of the printed figure on the page. In some cases, they also control the position. See Position of the Figure on the Page for properties that control position.
Note It is often easier to see what the printed or exported figure will look like, if you change the size of the screen figure by clicking and dragging its borders, then printing it at screen size. |
Position of the Figure on the Page
These properties control the position of the printed figure on the page.
Units of Measure
This property controls the units in which all values that describe the size and position of the printed figure are shown on the dialog boxes or returned on the command line.
Paper Size and Type
These properties enable you to select by type or by size, the paper on which the figure is printed.
Action |
Page Setup Dialog Box |
Command Line |
Set the paper type |
Paper tab. Use the list under Paper size to select from a list of predefined "paper types." The paper Width and Height fields are updated automatically to reflect the dimensions for your chosen paper type. If you are a Windows user, the list shows the paper types supported by the current printer. If you are a UNIX user, the list shows MATLAB's built-in paper types. By default, MATLAB selects portrait format 8.5-by-11.0 inch paper, if available. |
Set the PaperType property. Some possible values are 'usletter' (8.5-by-11 inches), 'uslegal' (11-by-14 inches), 'tabloid' (11-by-17 inches), 'A4' (210-by-297 mm). See the Figure Properties reference page for a list of paper types. |
Set the paper width and height |
Paper tab. Set the Width and Height fields to the desired paper width and height if you cannot find a suitable paper type in the Paper size list. Paper size is automatically updated to show a paper type of <custom> . When the paper type is set to <custom> , the paper size is handled by the printer. |
Set PaperSize property to a 2-element vector [paperwidth, paperheight] . |
Set the paper orientation |
Paper tab. Click on one of the Orientation option buttons: Portrait - Specifies that the longer paper dimension is oriented vertically with respect to the figure. Landscape - Orients the longer paper dimension horizontally. Rotated -Equivalent to rotating the paper 180º from landscape orientation. If Rotated is not supported by the current printer, the figure prints with landscape orientation. |
Set the PaperOrientation property. Possible values are 'portrait' , 'landscape' , and 'rotated' . The default is 'portrait' .You can use the orient function if you want the figure centered on the paper. |
Attributes of Lines, Text, and Background
By default, MATLAB forces the figure background to white, but retains colors used in the figure. These properties enable you to override this default behavior.
Action |
Page Setup Dialog Box |
Command Line |
Force line and text objects to black and white |
Lines and Text tab. Click on the Black and white option in the Lines and Text tab. The lines and text are printed all black or all white, depending on the background color. This setting is recommended for use with black and white printers because colored lines and text are dithered to gray that may not be suitable for thin lines and text characters. |
Specify the device as a black-and-white printer or graphics format. See the print reference page for a list of printers (i.e., drivers) and graphics formats. |
Keep the screen color for lines and text |
Lines and Text tab. Click on the Color (don't convert) option in the Lines and Text tab. The text and solid colored lines are printed in the same color as they are on the screen. If you are using a black and white printer, all of your text and solid colored lines are converted to shades of gray. |
This is the default. |
Force the figure background to white |
Axes and Figure tab. Click on the Force white background option in the Axes and Figure tab. MATLAB prints the figure with white axes and figure backgrounds. This setting is intended to save on toner and may produce better-looking printed results. |
Set the InvertHardCopy property to 'on' . This is the default. |
Keep the figure background in the screen color |
Axes and Figure tab. Click on the Keep screen background color option in the Axes and Figure tab. MATLAB prints the figure using the screen colors for both the axes and figure backgrounds. If you select this option and use a black and white printer, the background colors are dithered to shades of gray. |
Set the InvertHardCopy property to 'off' . |
If you have a black and white printer, you may want to read Getting the Best Results with Black-and-White Printers.
Axes, Tick Marks, and Uicontrols
By default, MATLAB recomputes the tick marks and the axes limits based on the size of the printed figure. It also retains uicontrols in the figure. These properties enable you to override this default behavior.
Action |
Page Setup Dialog Box |
Command Line |
Recompute axes limits and ticks |
Axes and Figure tab. Click on the Recompute axes limits and ticks option. MATLAB scales the number and placement of tick marks and the limit values of the axes depending on the size of the printed figure. Note: You can also make this change in the UNIX Print dialog box. |
Set the XTickMode , YTickMode , and ZTickMode properties to 'auto' . This is the default. |
Keep screen limits and ticks |
Axes and Figure tab. Click on the Keep screen limits and ticks option. MATLAB keeps the same number of ticks and the same limit values in the printed figure as are in the screen figure. Note: You can also make this change in the UNIX Print dialog box. |
Set the XTickMode , YTickMode , and ZTickMode properties to 'manual' . |
Keep or suppress printing of UI controls |
Axes and Figure tab. Deselect Print UIControls if you do not want uicontrols to appear in the printed figure. If you leave this check box selected, any uicontrols in the figure appear in the printout. Uicontrols include push buttons, listboxes, sliders, pop-up menus, editable text boxes, and check boxes that you can add to a figure. See the uicontrol reference page for a complete list. |
Use print -noui to suppress the uicontrols. The default is to keep the uicontrols. |
Rendering the Figure
A renderer is software and/or hardware that draws the figure you see on the screen in a file, or formats it for a printer. By default, MATLAB chooses a renderer.
Action |
Page Setup Dialog Box |
Command Line |
Let MATLAB choose the renderer |
Axes and Figure tab. Select Default (auto mode) in the Figure renderer list. MATLAB selects a rendering method based on the complexity of the figure and the settings of various Handle Graphics properties. This setting usually produces a satisfactory printout. See the Figure Properties reference page for information about MATLAB's autoselection criteria. |
This is the default. |
Select a specific renderer |
Axes and Figure tab. MATLAB uses the renderer you select from the Figure renderer list to render the figure. Select Painter's if you want to print using vector graphics. Select Z-buffer or OpenGL if you want to print using raster (bitmap) graphics. |
Set the Renderer property to 'painters' , 'zbuffer' , or 'OpenGL' . |
Note The renderer you can use is sometimes limited by the printer driver or export format. See the table of renderer support. |
For more information on setting the rendering method, see
![]() | From the Command Line | Printing the Figure | ![]() |