Documentation

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

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 already setup, then restart MATLAB®.

    Note:   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. Additionally, 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.

    Note:   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.

    Note:   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.

    Note:   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 Examples

Was this topic helpful?