make matlab figures for black backgrounds
February 16th, 2009 by Lawrence David
i prefer to make all of my powerpoint and keynote slides with dark backgrounds and white text. i find these slides to be much more readable in a dark room; the problem with this setup though is that most figure-making software automatically draw dark lines. matlab falls into this category.
to make matlab automatically create figures amenable to black slides, i’ve hit upon the following handy trick. prepend the following code right before you save your figure:
set(0,’DefaultAxesColor’,'w’,…
‘DefaultAxesXColor’,'w’,…
‘DefaultAxesYColor’,'w’,…
‘DefaultAxesZColor’,'w’,…
‘DefaultTextColor’,'w’,…
‘DefaultLineColor’,'w’)
set(gcf,’Color’,'w’)
set(gca,’color’,'none’
voila! all your figure text and lines are now white!