home *** CD-ROM | disk | FTP | other *** search
- function whitebg
- %WHITEBG Graphics figure default background color changed to white.
- % WHITEBG changes the current figure's default background color
- % to white as well as other properties so graphs look good.
- % In addition, the root's default properties are set so
- % subsequent plots in the current figure and new figures use
- % the white background.
-
- % Copyright (c) 1984-93 by The MathWorks, Inc.
-
- ch = get(0,'children');
- if isempty(ch)
- fig = 0;
- else
- fig = [gcf 0];
- end
- set(fig,'defaultfigurecolor','white')
- set(fig,'defaulttextcolor','black')
- set(fig,'defaultaxesxcolor','black')
- set(fig,'defaultaxesycolor','black')
- set(fig,'defaultaxeszcolor','black')
- set(fig,'defaultsurfaceedgecolor','black')
- co = get(fig(1),'defaultaxescolororder');
- if (get(0,'ScreenDepth') == 1)
- co = [0 0 0];
- end
- nco = size(co,1);
- set(fig,'defaultaxescolororder',co(fftshift(1:nco),:));
- set(fig,'defaultfigureinverthardcopy','off');
-