MATLAB Function Reference    

Change axes background color



whitebg complements the colors in the current figure.

whitebg(h) complements colors in all figures specified in the vector h.

whitebg(ColorSpec) and whitebg(h,ColorSpec) change the color of the axes, which are children of the figure, to the color specified by ColorSpec.


whitebg changes the colors of the figure's children, with the exception of shaded surfaces. This ensures that all objects are visible against the new background color. whitebg sets the default properties on the root such that all subsequent figures use the new background color.


Set the background color to blue-gray.

Set the background color to blue.

See Also


The figure graphics object property InvertHardCopy

Color Operations for related functions

  while who, whos