home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / GRAPHICS.DI$ / WHITEBG.M < prev   
Encoding:
Text File  |  1993-03-07  |  948 b   |  30 lines

  1. function whitebg
  2. %WHITEBG Graphics figure default background color changed to white.
  3. %    WHITEBG changes the current figure's default background color
  4. %    to white as well as other properties so graphs look good.
  5. %    In addition, the root's default properties are set so
  6. %    subsequent plots in the current figure and new figures use
  7. %    the white background.
  8.  
  9. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  10.  
  11. ch = get(0,'children');
  12. if isempty(ch)
  13.    fig = 0;
  14. else
  15.    fig = [gcf 0];
  16. end
  17. set(fig,'defaultfigurecolor','white')
  18. set(fig,'defaulttextcolor','black')
  19. set(fig,'defaultaxesxcolor','black')
  20. set(fig,'defaultaxesycolor','black')
  21. set(fig,'defaultaxeszcolor','black')
  22. set(fig,'defaultsurfaceedgecolor','black')
  23. co = get(fig(1),'defaultaxescolororder');
  24. if (get(0,'ScreenDepth') == 1)
  25.    co = [0 0 0];
  26. end
  27. nco = size(co,1);
  28. set(fig,'defaultaxescolororder',co(fftshift(1:nco),:));
  29. set(fig,'defaultfigureinverthardcopy','off');
  30.