The ability to export figures with transparent backgrounds in the JPEG,TIFF,BMP and PNG formats is not available in MATLAB.
To work around this issue, export your figure to EPS-file format. For example:
figure('Color', 'r'); plot(1:3)
set(gcf,'Color', 'none')
set(gcf,'InvertHardCopy','off')
print -deps xxx.eps
The JPEG-file and TIFF-file formats do not support transparency.
To export a figure with a transparent background to the PNG format, please refer to the workaround suggested in the bug report:
Best Answer