Main Content

uiprintdlg

Open figure print dialog box

Since R2025a

    Description

    uiprintdlg opens a dialog box with options for printing the current figure (gcf). The current figure is an existing figure that has the HandleVisibility property set to "on". If no such figure exists, MATLAB® returns an error.

    example

    uiprintdlg(fig) opens a dialog box with options for printing the specified figure.

    Examples

    collapse all

    Create a graph and open a print dialog box using uiprintdlg.

    surf(peaks)
    uiprintdlg

    Print dialog box showing a print options and a preview of a graph

    Clicking Print or Cancel returns you to the command line.

    Input Arguments

    collapse all

    Figure to print, specified as a Figure object.

    Limitations

    • 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.

    • In MATLAB Online™, you can use uiprintdlg to print to PDF, but not to external printers.

    More About

    collapse all

    Version History

    Introduced in R2025a