Graphics |
Exporting to the Windows Clipboard
You can export a figure to the Windows clipboard using one of two graphics formats: EMF color vector or BMP 8-bit color bitmap.
By default, MATLAB chooses the graphics format for you, based on the rendering method used to display the figure. For figures rendered with OpenGL or Z-buffer, MATLAB uses the BMP format. For figures rendered with Painter's, the EMF format is used. For information about how MATLAB selects a rendering method, see The Default Renderer for MATLAB.
To override the selection by MATLAB, specify the format of your choice using either the Windows Copy Options Preferences dialog box, or the -d
switch in the print command.
You can export to the clipboard:
Using the Graphical User Interface on Windows
Before you export the figure to the clipboard, you can use the Copy Options Preferences dialog box to select a nondefault graphics format, or to adjust certain figure settings. These settings become the new defaults for all figures exported to the clipboard.
Note
When exporting to the clipboard in Windows metafile format (-dmeta ),
the settings from the figure Copy Options Preferences template are ignored.
|
To open the Copy Options Preferences dialog box, select Copy Options from the figure window's Edit menu. Any changes you make with this dialog box affect only the clipboard copy of the figure; they do not affect the way the figure looks on the screen.
Settings you can change in the Copy Options Preferences dialog box are as follows:
Clipboard format. To copy the figure in EMF color vector format, select Metafile. To use BMP 8-bit color bitmap format, select Bitmap. Or, to have MATLAB select the format for you, select Preserve information. MATLAB uses the metafile format whenever possible.
Figure background color. To keep the background color the same as it appears on the screen, select Use figure color. To make the background white, select Force white background. For a background that is transparent, for example, a slide background to frame the axes part of a figure, select Transparent background.
Size. Select Match figure screen size to copy the figure as it appears on the screen, or leave it unselected to use the Page Setup settings to determine its size.
Using MATLAB Commands
Export to the clipboard using the print
function with a graphics format, but no filename. You must use one of the following clipboard formats: -dbitmap
or -dmeta
. These switches create a Windows bitmap (BMP) or an enhanced metafile (EMF), respectively.
For example, to export the current figure to the clipboard in enhanced metafile format, type
Note
When printing, the print -d option specifies a printer driver. When
exporting, the print -d option specifies a graphics format.
|
Exporting to a File | Examples of Basic Operations |
© 1994-2005 The MathWorks, Inc.