recipes : Plotting : Plot Manipulation : Modifying figure background colour


You want to change the figure background to something other than that grey colour.


Alter the properties of the figure object.



gcf returns the handle for the current figure. The "handle" is simply a reference that Matlab uses to keep track of a particular resource. Figure windows, axes, and scatter plot points are all examples of objects which can be refered to via a handle.

Issuing the command get(gcf) will return all of the properties associated with the figure window. These properties can be modified with the set command. For example, to alter the text in the title bar:

set(gcf,'Name','my wonderful figure')