Graphics |
|
Exporting a Figure to the Clipboard
Export a figure to the clipboard in graphics-format when you want to paste it into another Windows application such as a word processor.
Using the Graphical User Interface on Windows
This example exports a figure to the clipboard in Enhanced Metafile (EMF) format. Figure settings are chosen that would make the exported figure suitable for use in a PowerPoint slide. Note that changing the settings modifies the figure displayed on the screen.
- Create a figure containing text. You can use the following code.
- Select Preferences from the figure window's File menu. Then select Figure Copy Template from the Preferences dialog box.
- In the Figure Copy Template Preferences panel, click the PowerPoint button. The MATLAB suggested settings for PowerPoint are added to the template.
- In the Lines panel, change the Custom width to 4 points.
- In the Uicontrols and axes panel, select Keep axes limits and tick spacing to prevent MATLAB from possibly rescaling ticks and limits when you export.
- Click Apply to Figure. The changes appear in the figure window.
- If you don't like the way your figure looks with the new settings, you can
restore it to its original settings by clicking the Restore Figure button.
- In the left pane of the Preferences dialog box, expand the Figure Copy Template topic. Select Copy Options.
- In the Copy Options panel, select Metafile to tell MATLAB to export the figure in EMF format.
- Check that Transparent background is selected. This choice makes the figure background transparent and allows the slide background to frame the axes part of the figure.
- Clear Match figure screen size check box so that you can use your own figure size settings.
- Click OK.
- Select Page Setup from the figure window's File menu.
- In the Size and Position tab, set Width to
10
and Height to 7.5
. Make sure that Units are set to inches
.
- Click OK.
- Select Copy Figure from the Edit menu. Your figure is now exported to the clipboard and can be pasted into another Windows application such as a PowerPoint slide.
Using MATLAB Commands
Use the print
function and one of two clipboard formats (-dmeta
, -dbitmap
) to export a figure to the clipboard. Do not specify a filename.
This example exports a figure to the clipboard in Enhanced Metafile (EMF) format.
This example exports a figure to the clipboard in Bitmap (BMP) 8-bit color format.
| Exporting in EPS Format with a TIFF Preview | | Changing a Figure's Settings | |