Main Content

Print Figure from File Menu

Simple Printout

To print a figure, use File > Print. For example, create a bar chart to print.

x = [3 5 2 6 1 8 2 3];
bar(x)

Click File > Print, select a printer, and click OK. The printer must be set up on your system. If you do not see a printer that is set up already, then restart MATLAB®.

To print the figure programmatically, use the print function.

Preserve Background Color and Tick Values

Some details of the printed figure can look different from the figure on the display. By default, printed figures use a white figure background color. Also, if the printed figure size is different from the original figure size, then the axis limits and tick values can differ.

  • Preserve the figure background color by clicking File > Print Preview > Color tab. Select Same as figure for the background color. Select Color for the color scale.

  • Preserve the axis limits and tick value locations by clicking File > Print Preview > Advanced tab. Then, for the Axis limits and ticks option, select Keep screen limits and ticks.

To retain the color scheme programmatically, set the InvertHardcopy property of the figure to 'off'. To keep the same axis limits and tick marks, set the XTickMode, YTickMode, and ZTickMode properties for the axes to 'manual'.

Figure Size and Placement

To print a figure with specific dimensions, click File > Print Preview > Layout tab. Then, for the Placement option, select Use manual size and position. Specify the dimensions you want in the text boxes. Alternatively, use the sliders to the left and top of the figure preview to adjust the size and placement.

MATLAB changes the figure size in the print preview, but does not change the size of the actual figure.

Print Preview dialog box with the Layout tab selected

To specify the printed figure size and placement programmatically, use the PaperPosition property for the figure.

Line Width and Font Size

To change the line width, font size, and font name for the printed output, click File > Print Preview > Lines/Text tab. Specify a custom line width in the appropriate text box, for example, 2 points. Select a font name from the dropdown list of fonts and specify a custom font size. For example, use 20 point Garamond font.

MATLAB changes the line width and font in the print preview, but does not change the appearance of the actual figure.

Lines/Text tab of the Print Preview dialog box

To change the line width and font size programmatically, set properties of the graphics objects. For a list, see Graphics Object Properties.

See Also

|

Related Topics