Exporting figure to EMF file type distorts image

55 views (last 30 days)
Hi all,
I am exporting figure plots to an EMF file to be used with Adobe Illustrator in the future. The plot looks fine when opened as a figure in matlab. However, when I export it to an EMF it becomes distorted.
Here is a screen shot of the plot in matlab (looks super pretty):
Here is a screen shot of the EMF file opened in Illustrator (looks super not pretty):
Specifically, all the colors are lighter or more transparent. The black is more of a gray. And the red and blue lines are transparent. Also, the tick marks on the y-axis don't line up with their labels.
The code I am using to save the figure is as follows.
fig = figure(1);
path = 'filepath_of_where_i_want_the_image';
filename = 'Length.emf';
saveas(fig, fullfile(path,filename));
I have many images to save, so I would prefer to use code than an automated method.
Is there a way to fix this problem? Or is it unavoidable? I am using R2017a.
Edit: I accidentally took a screen shot of different plots, but think the issue is pretty clear.

Answers (1)

Kiran Felix Robert
Kiran Felix Robert on 3 Nov 2020
Hi Vivek,
Does the change in figure appear only when you open it in Adobe illustrator? Have you tried opening it in MS Paint?
Also Try using the print function to save the figure in the EMF Format, this might solve the issue.
f = figure;
bar(x);
print -dmeta;
print(f,'File.emf','-dmeta')
Refer to the Print function documentation
Kiran Felix Robert

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Tags

Products


Release

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!