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.

  1. Create a figure containing text. You can use the following code.
  2. Select Preferences from the figure window's File menu. Then select Figure Copy Template from the Preferences dialog box.
  3. In the Figure Copy Template Preferences panel, click the PowerPoint button. The MATLAB suggested settings for PowerPoint are added to the template.

  4. In the Lines panel, change the Custom width to 4 points.
  5. 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.
  6. Click Apply to Figure. The changes appear in the figure window.
  1. 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.

  1. In the left pane of the Preferences dialog box, expand the Figure Copy Template topic. Select Copy Options.
  2. In the Copy Options panel, select Metafile to tell MATLAB to export the figure in EMF format.
  3. 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.
  4. Clear Match figure screen size check box so that you can use your own figure size settings.
  5. Click OK.
  6. Select Page Setup from the figure window's File menu.
  7. In the Size and Position tab, set Width to 10 and Height to 7.5. Make sure that Units are set to inches.
  8. Click OK.
  9. 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