MATLAB: Transparent background for figures

figureprint

I get the following warning in r2011a
set(gcf, 'Color', 'None')
Warning: Setting the ColorSpec to 'none' for a figure will not be allowed in a future release.
I use the "none" color so that I can print pdf and eps files with transparent backgrounds. How are you supposed to set a transparent background?

Best Answer

You can edit the eps file generated by print, and remove the line which creates the background rectangle, thus making the background transparent.
Or you can use the latest version of export_fig, which will do this for you when the -transparent option is specified, and will allow you to export to pdf as well.