Graphics |
There are two types of background color settings in a figure: the axes background and the figure background. The default displayed color of both backgrounds is gray, but you can set them to any of several colors.
Regardless of the background colors in your displayed figure, by default, MATLAB always changes them to white when you print or export. This section shows you how to retain the displayed background colors in your output.
Using the Graphical User Interface
To retain the background color on a per figure basis,
If you are exporting your figure using the clipboard, use the Copy Options panel of the Preferences dialog box.
Using MATLAB Commands
To retain your background colors, use
The following example sets the figure background color to blue
, the axes background color to yellow
, and then sets InvertHardCopy
to off
so that these colors will appear in your printed or exported figure.
Setting the Axes Ticks and Limits | Setting Line and Text Characteristics |
© 1994-2005 The MathWorks, Inc.