Printing and Exporting Figures with MATLAB |
 |
How to Choose a File Format
The best format to use depends on many factors. Use the following questions to help you choose a format.
What Type of Figure Do You Have?
- If it's a complex figure, you should probably use a bitmap format. If the figure contains mostly lines and text, a vector format is best. See Bitmap and Vector Formats for more help in deciding which type is appropriate for your figure.
- If it's a Simulink model, it can only be exported to EPS or a Ghostscript format. For information about Ghostscript formats, see Built-In MATLAB and Ghostscript Formats for more information. Note that you can only use the
print
command to export a model, not the Export dialog box. For instructions, see Exporting Using MATLAB Commands.
- If it contains many colors, you should use a format with a high enough bit depth to accommodate the colors. See Preserving Colors in Exported Figures.
- If it's a color figure, and you want to export it in color, choose a color format. The formats come in color, grayscale, and black and white. The first column of Table 4-1, Export Formats and Export-Only Options, indicates what color the format supports. (Note that some formats come in different variations. For example, the PCX format is available in color and black and white. Be sure to specify the correct one.)
Where Will You Use the Exported Figure?
- If you will use it in a journal or other publication, use a format that enables you to set a high resolution. We recommend using either TIFF or EPS. Note that you cannot set a resolution for Ghostscript formats. See Setting Resolution to see which formats take resolution settings. If you choose a bitmap format, see also Getting the Best Results With Bitmap Formats.
- If you will use it in a web publication, you should use either the PNG or the JPEG format. For more information about JPEG, see JPEG Files. Note that if you need a GIF image, you can export your figure as a TIFF file and convert it to a GIF using another software application.
- If you want to read the figure back into MATLAB later, it's best to use one of the built-in MATLAB formats. See Built-In MATLAB and Ghostscript Formats for more information.
What Kind of Editing Support Do You Need?
On What Platform Will You Use the Exported Figure?
- If you are using the exported figure in a Windows or UNIX application, check to see if the format is supported for that platform. See the table under the Graphics Format Files section of the
print
reference page. The third column indicates whether a format is supported by Windows and/or UNIX systems.
- If you want a format that is supported on both Windows and UNIX, use either TIFF or EPS. These have wide application support on both platforms. See TIFF Files and EPS Files for details about these formats.
| Details About Selected File Formats | | More About MATLAB Format Types |  |