Printing and Exporting Figures with MATLAB    

Importing MATLAB Graphics into Other Applications

You can include MATLAB graphics in a wide variety of applications for word processing, slide preparation, modification by a graphics program, presentation on the Internet, and so on. In general, the process is the same for all applications

  1. Use MATLAB to create the figure you want to import into another application.
  2. Export the MATLAB figure to one of the supported graphics file formats, selecting a format that is both appropriate for the type of figure and supported by the target application. See How to Choose a File Format for help.
  3. Use the import features of the target application to import the graphics file.

Edit Before You Export

Vector graphics may be fully editable in a few high-end applications, but most applications do not support editing beyond simple resizing. Bitmaps cannot be edited with quality results unless you use a software package devoted to image processing.

In general, you should try to make all the necessary settings while your figure is still in MATLAB. The chapter on Fine-Tuning Your Output describes several tasks that will help you get the best results, such as Example - Fine-Tuning a Figure, which shows how to make several common settings before the figure is ready for export.

Importing into Microsoft Applications

To import your exported figure into a Microsoft application, select Picture from the Insert menu. Then select From file and navigate to your exported file.

If you use the clipboard to perform your export operations, you can take advantage of MATLAB's recommended settings for Word and PowerPoint. See Creating and Applying a Copy Template for details.

Example - Importing an EPS Graphic into LaTeX

This example shows how to import an EPS file named peaks.eps into LaTeX.

EPS graphics can be edited after being imported to LaTeX. For example, you can specify the height in any LaTeX-compatible dimension. To set the height to 3.5 inches, use the command:

You can use the angle command to rotate the graph. For example, to rotate the graph 90 degrees, add

to the same line of code that sets the height, i.e., [height=10cm,angle=90].


 Using the getframe Command to Export a Graphic Application Format Support