Printing and Exporting Figures with MATLAB | ![]() ![]() |
Example - Exporting to a TIFF File
The following example shows how to export the current figure to a TIFF file. This example also shows how to set the background color to blue and keep it from changing to white when you export the figure. The instructions first refer to using the graphical user interface, then show how to perform the same operations using MATLAB commands.
Using the Graphical User Interface
Using MATLAB Commands
To perform this same tasks shown above with MATLAB commands,
surf(peaks(30)); set(gcf, 'Color', 'blue'); % Set background color. set(gcf, 'InvertHardCopy', 'off'); % Retain background color. print -r300 -dtiff myfile.tif % Export to TIFF file at 300 dpi.
Note
Because you are using the print command and a built-in MATLAB
format, you can specify a resolution as shown above (-r300 ). For more
information about resolution, see Setting Resolution.
|
![]() | Exporting Quick Start | Setting the Export File Format | ![]() |