MATLAB: Save transparent .emf file from figure

2015bemfexportfigureplot

I'm using 2015b version and would like to save a transparent .emf file from Matlab plot. However, when I export .emf file, the background is white.(I know about copy options with transparency, however, want to save .fig files in a batch process and then save .emf files manually.) How can I sole this issue?

Best Answer

Set the figure background Color to 'none' and the Inverthardcopy property to 'off' before calling the print command:
f = figure;
plot(rand(4));
set(f, 'Color', 'none', 'Inverthardcopy', 'off');
print(f, '-dmeta', 'transparent.emf');