Graphics Previous page   Next Page

Saving Your Work

After editing a graph, you can

Saving a Graph in MAT-File Format

MATLAB supports a binary format in which you can save figures so that they can be opened in subsequent MATLAB sessions. MATLAB assigns these files the .fig filename extension.

To save a graph in a figure file,

  1. Select Save from the figure window File menu or click the Save button on the toolbar. If this is the first time you are saving the file, the Save As dialog box appears.
  2. Make sure that the Save as type is Fig-File.
  3. Specify the name you want assigned to the figure file.
  4. Click OK.

The graph is saved as a figure file (.fig), which is a binary file format used to store figures.

You can also use the saveas command.

Use the hgsave command to create backward compatible Fig-Files.

If you want to save the figure in a format that can be used by another application, see Saving to a Different Format -- Exporting Figures.

Opening a Figure File

To open a figure file, perform these steps:

  1. Select Open from the File menu or click the Open button on the toolbar.
  2. Select the figure file you want to open and click OK.
  1. The figure file appears in a new figure window.

You can also use the open command.

Saving to a Different Format -- Exporting Figures

To save a figure in a format that can be used by another application, such as the standard graphics file formats TIFF or EPS, perform these steps:

  1. Select Export Setup from the File menu. This dialog provides options you can specify for the output file, such as the figure size, fonts, line size and style, and output format.
  2. Select Export from the Export Setup dialog. A standard Save As dialog appears.
  3. Select the format from the list of formats in the Save as type drop-down menu. This selects the format of the exported file and adds the standard filename extension given to files of that type.
  4. Enter the name you want to give the file, less the extension.
  5. Click Save.

Copying a Figure to the Clipboard

On Windows systems, you can also copy a figure to the clipboard and then paste it into another application:

  1. Select Copy Options from the Edit menu. The Copying Options page of the Preferences dialog box appears.
  2. Complete the fields on the Copying Options page and click OK.
  3. Select Copy Figure from the Edit menu.
  1. The figure is copied to the Windows clipboard. You can then paste the figure from the Windows clipboard into a file in another application.


Previous page  Selecting Objects in a Graph Printing Figures Next page

© 1994-2005 The MathWorks, Inc.