0
votes

I'm having some matlab plots. when I save the plot and then put it in my word document and then save it as pdf file. I get the plot labels blurry and some letters is unclear ?!

plot(d1,S,'*');
title('Frequency','FontWeight','bold','FontSize',11);
xlabel('delta','FontWeight','bold','FontSize',11), ylabel('sigma','FontWeight','bold','FontSize',11);

why does that happened (got angry)?! how can I fix it ?!

1
As a guess, are you saving the figure as a raster format like .jpg or .png? If so, just save it as a vector format like .eps or .wmf (or just go Edit -> Copy Figure and paste it into your document, since you're using Word).wakjah
yes Im saving in jpg or bmp. how can I save it as a vector format ?PLS
Use .eps or .wmf, or go lookup which of the other formats in the list are vector formats (I can't remember the whole list).wakjah
if you are working interactively, try print -dmeta. This will copy the figure into the clipboard. Next open Word, and simply paste it: Ctrl-v. Otherwise use print with some vector format as suggestedAmro
Consider using the widely used function export_fig from the file exchange. This makes it much easier to get publication quality figures.Joshua Barr

1 Answers

0
votes

There are many discussions about this on the web, but non of the solutions actually satisfied me when I wanted to export a graph to an image. Anyway here is what I've done:

MyFont = {'FontName', 'Times New Roman', 'FontSize', 25};
graph_size = [1200 800]; % in pixels

fig_h = figure('Units', 'pixels', 'Position', [10 50 graph_size]);

% Do your plot
x = 0:0.1:2*pi;
plot(x, sin(x))

set(gca, MyFont{:}); % Adjust all the font sizes in the axes

Now you can copy a vector-based version (which is nicest quality as @wakjah mentioned) to clipboard with print (as @Amro said):

print -dmeta

Or with hgexport which exports to metafile again:

hgexport(figH,'-clipboard')

However you need to adjust the graph_size and FontSize in MyFont manually to get your desired output. But the good thing is that if you want it for some publication you just need to do it once.

Please note that although you are exporting the graphs as a vector-based format but your graph lines would still seem fractured if you zoom on them but they are not blurry. This is why you might want to increase the size of your graph on screen (graph_size and consequently the FontSize) to have a more accurate graph.

Hope this helps.

Related posts:

MATLAB: print a figure to pdf as the figure shown in the MATLAB

In matlab, how do you save a figure as an image in the same way as using "Save As..." in the figure window?