Copy figure - bad quality

76 views (last 30 days)
Mario Rossi
Mario Rossi on 22 Mar 2012
Commented: Mario Rossi on 20 Apr 2022
Hi all,
I have some problem with the quality of copied figure. If I plot something and then I chose edit-copy figure, no problems, I can paste them in word and the quality is good. BUT if I do some modifications on the figure, for example I add some text or shapes, then if I do copy figure, the quality of the pasted image in word is lower.. For example it's impossible to read well the axis label.. You have any idea of the solution for this problem?
Thank you

Answers (9)

Vinh Ho
Vinh Ho on 13 May 2019
Edited: Vinh Ho on 13 May 2019
Go to copy options and choose "Metafile" for clipboard format. The resolution is pefect, alghouth it said "may loose information" but i did not have that problem yet.
Mario Rossi
Mario Rossi on 20 Apr 2022
what's the point of commenting a 3 years old comment on a 10 years old thread?? moreover with a comment without any useful content.

Sign in to comment.

Malcolm Lidierth
Malcolm Lidierth on 22 Mar 2012
  1 Comment
Image Analyst
Image Analyst on 22 Mar 2012
Someone else just asked about saving and I referred him to the FAQ: (Make sure the final dot is included in the URL). The FAQ also which mentions export_fig(), which is the consistently the most downloaded File Exchange submission. I guess that's why questions on saving figures are the MOST commonly asked question - we get 1 to 3 a day or so.

Sign in to comment.

Richard on 22 Mar 2012
try saving the figure from matlab as a .jpg file by typing
ff =(C:\My Documents);
fnout = [ff, '\FigureName', num2str(1,'%.2d'), '.jpg'];
This will then save the figure in my documents. Then in word go to inser--> picture.
If you want really high quality figures, you should save your figures as .eps files, but I dont think that word accepts these.
  1 Comment
Richard on 23 Mar 2012
Try using:

Sign in to comment.

Mario Rossi
Mario Rossi on 22 Mar 2012
Thank you for the answers.
@lestyn: I can manually export in jpg, but the situation is the same, even worse maybe..
@Malcom: yes, I've already tried export_fig, but nothing changes.
The key point is that I don't understand why the copied figure changes between the situation "figure without any change", and the "figure after that I add some shapes"... It should be the same!
  1 Comment
Oliver Woodford
Oliver Woodford on 25 Mar 2012
An example script would help a lot.

Sign in to comment.

Malcolm Lidierth
Malcolm Lidierth on 22 Mar 2012
This will not improve the image like export_fig but it does reproduce what's on screen -so if if you do not see grotty graphics on screen this may help.
It calls
which is defined in Project Waterloo, and returns a reference to the MATLAB heavyweight/lightweight container but you could get that in other ways e.g. with Yair Altman's findjobj.
Dependent jars are part of the standard MATLAB distribution and are on the static javaclasspath.
MATLAB seem to build graphics in an offscreen buffer then paste a bitmap into the Java AWT Canvas. Here, that is replaced with an Apache Batik SVGCanvas. The MALAB graphics will be embedded as a bitmap in the file.
function SaveAsSVG(fh, str)
% SaveAsSVG saves a MATLAB figure to an SVG file
% Example:
% SaveAsSVG(figurehandle, filename)
% where filename is the fully qualified name of the file to write.
% Part of Project Waterloo and the sigTOOL Project at King's College
% London.
% Author: Malcolm Lidierth 03/11
% Copyright © The Author & King's College London 2011-
% Email: sigtool (at)
% ---------------------------------------------------------------------
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.batik.dom.GenericDOMImplementation;
import org.apache.batik.svggen.SVGGeneratorContext;
import org.apache.batik.svggen.SVGGraphics2D;
import org.apache.batik.svggen.SVGGraphics2DIOException;
import org.w3c.dom.DOMImplementation;
if nargin<2 || isempty(str)
[folder filename ext]=fileparts(str);
if isempty(ext);ext='.svg';end
if isempty(folder);folder=pwd();end
str=[fullfile(folder, filename), ext];
thisFile = File(str);
OutputStream = [];
OutputStream =FileOutputStream(thisFile);
catch ex
domImpl = GenericDOMImplementation.getDOMImplementation();
svgNS = '';
document = domImpl.createDocument(svgNS, 'svg', []);
svgGenerator = SVGGraphics2D(document);
out = OutputStreamWriter(OutputStream, 'UTF-8');
catch ex
try, true);
catch ex

Mario Rossi
Mario Rossi on 26 Mar 2012
if I have to use this long method, so it's much faster to copy and paste in paint or some kind of image editing program... Thank you anyway!

hudin ako dian tariche
hudin ako dian tariche on 9 May 2012
reproduce your picture.

John Petersen
John Petersen on 27 Jul 2012
Save it as a .emf or .png file. These retain image quality for graphs and plots with lines.

Albert Yam
Albert Yam on 27 Jul 2012
This might just be copy/paste but, try
print -s -dmeta


Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by