Main Content

Print or Export Figure from Figure Toolstrip

Since R2025a. Replaces Print Figure from File Menu (R2024b).

You can print or export figures from the figure toolstrip with options to adjust settings like width, height, resolution, and background color. To access the figure toolstrip, create a figure. For example, create a surface plot.

surf(peaks)

Surface plot in a figure with the figure toolstrip at the top of the window

Print Figure

You can use the figure toolstrip to print plots and other data visualizations in a figure. However, UI components are not supported. To print the user interface of an app, use the exportapp function to create an image. Then print the image.

To print the contents of a figure using the figure toolstrip, on the Figure tab, click Print.

Print dialog box showing the print options and a preview of a plot

This table describes the options you can set.

SectionOptions

Destination

  • Output destination, such as a physical printer or PDF.

Layout

  • Paper orientationPortrait or Landscape.

  • Paper size — A predefined paper size or a custom size.

  • Units — Units for the paper size. This selection also applies to the values under Custom.

  • Scaling

    • No scaling — Do not resize the contents in the figure. Some content might be clipped.

    • Best fit (keep aspect ratio) — Resize the figure to the maximum size that fits on the given paper size without changing the aspect ratio.

    • Fill page (stretch) — Resize the figure to the maximum size that fits on the given paper size, changing the aspect ratio if necessary.

    • Custom — Use the specified width and height of the figure itself and the left and right margins. The Keep centered and Keep aspect ratio options for this setting might crop the image depending on the figure and margin sizes.

Other Settings

  • Resolution (DPI) — Dots per inch (DPI) in the output.

  • Background color — Color of the space that surrounds the axes or chart. You can enter a color name or an RGB triplet in the box or use the color picker. If you set the Color property of the figure and choose auto, the background stays the same color. If you do not set Color, auto sets the color to white.

  • Color space — Specify RGB for full-color output or Gray for grayscale output.

Export Figure

To export a figure as a file, on the Figure tab, click the top half of the Save As button. In the Save As dialog box, select a folder and file type, and enter a file name. PDF files are saved as full-page PDFs. Image files, such as JPEG and PNG files, are saved with a resolution of 150 dots-per-inch (DPI).

You can also export a 150-DPI PNG file or a tightly cropped PDF fragment (not a full page) by clicking the bottom half of the Save As button and then selecting Export to PNG or Export to PDF, respectively.

To export a figure and specify options, such as resolution, width, and height, click the bottom half of the Save As button, and the select the Export to menu item.

Export dialog box showing export options and a preview of a plot

This table describes the options you can set.

SectionOptions

Output Content

  • Include UI Components — Option to include any UI components, containers (such as panels), and adjacent plots that exist in the figure. When this option is selected, all the options for specifying the size, resolution, background color, and color space are disabled. To reenable those options, clear the Include UI Components check box.

Destination

  • Name — File name and path.

  • Format — File format. Options include EMF (Windows® only), EPS, JPEG, PDF, PNG, SVG, and TIFF.

Output Size

  • Keep aspect ratio — Option to preserve the aspect ratio when changing the Width or Height.

  • Width — Custom width in the specified units.

  • Height — Custom height in the specified units.

  • Units — Units for the width and height values.

Other Settings

  • Resolution (DPI) — Dots per inch (DPI) in the output file.

  • Background Color — Color of the space that surrounds the axes or chart. You can enter a color name or an RGB triplet in the box or use the color picker. If you set the Color property of the figure and choose auto, the background stays the same color. If you do not set Color, auto sets the color to white in the light theme or dark gray (almost black) in the dark theme.

  • Color space — Specify RGB for full-color output or Gray for grayscale output.

See Also

| | |

Topics