Save Graphs

After you create, edit, and explore a function plot, you might want to save the result. MATLAB® provides three different ways to save graphs:

  • Save a graph as a MATLAB FIG-file (a binary format). The FIG-file stores all information about a graph, including function plots, graph data, annotations, data tips, menus and other controls. You can open the FIG-file only with MATLAB.

  • Export a graph to a different file format. When saving a graph, you can choose a file format other than FIG. For example, you can export your graphs to EPS, JPEG, PNG, BMP, TIFF, PDF, and other file formats. You can open the exported file in an appropriate application.

  • Print a graph on paper or print it to file. To ensure the correct plot size, position, alignment, paper size and orientation, use Print Preview.

  • Generate a MATLAB file from a graph. You can use the generated code to reproduce the same graph or create a similar graph using different data. This approach is useful for generating MATLAB code for work that you have performed interactively with the plotting tools.

For details, see Printing and Saving.

Was this topic helpful?