Graphics    

Exporting to the Clipboard

You can export a figure in graphics format to the Windows clipboard from the figure's Edit menu or from the command line. You can choose one of two graphics formats for exporting to the clipboard, EMF color vector (-dmeta) or BMP 8-bit color bitmap (-dbitmap). If you use the menus to export the figure, you can also elect to let MATLAB choose which of the two formats to use.

By default, the format is chosen based on the rendering method used to display the figure. If the figure is displayed with the OpenGL or Z-buffer renderer, Windows Bitmap is the default. If the figure is displayed with the Painter's renderer, the EMF format is used.

From the Edit Menu

To export the current figure to the clipboard, select Copy Figure from the figure window's Edit menu.

Before you export the figure, you can use the Figure Copy Template Preferences panel and the Copy Options Preferences panel to adjust the figure's settings. These settings override corresponding settings you made using the Page Setup dialog box or the set command. Invoke the Preferences panels from the figure's File menu.

Figure Copy Template Preferences.   This panel enables you to create a template and apply it to the current figure. When you click Apply to Figure, MATLAB saves the template and uses it to modify the screen figure. Click Restore Figure to restore the figure to its original state.

Copy Options Preferences.   This panel enables you to adjust the figure's settings. These changes override settings you made with the Page Setup dialog box or the set command. They do not affect the way the figure looks on the screen.

From the Command Line

Use the print command to export the figure to the clipboard in graphics format. Do not specify a filename.

where the command arguments are:

-device
Graphics format used to draw the figure on the clipboard:

-dmeta
EMF color vector format

-dbitmap
BMP 8-bit color bitmab
-options
Specifies options that control some aspects of the look of the exported figure. You can also specify the figure to be exported. Unlike the properties you set with the set function, these values are not saved with the figure. You must specify them each time you export the figure. Commonly used options are:

-fhandle
Handle of the figure to export. For Figure No. 2, specify -f2. By default MATLAB exports the last active figure.

-noui
Suppress printing of uicontrols.

See the print reference page for a complete list of supported options.


 Exporting to a File Troubleshooting