vector graphic quality or .eps

9 views (last 30 days)
Mohammad Aliakbarimiyanmahaleh
Edited: Cam Salzberger on 2 Sep 2015
when I save a figure as .eps format in my laptop under windows 7, I face some problems which is the quality of the images is not good but the size of that is too big(7 Mg), when I save the figure as a .eps format in other computer, the size is just(300 kb), quality is better but still not good. Have you ever have this problem? How can I improve the quality of vector graphic quality? Also when you see the .eps figure in Mac, you can see some gray grid as a background of figure.

Answers (1)

Cam Salzberger
Cam Salzberger on 2 Sep 2015
Edited: Cam Salzberger on 2 Sep 2015
Hello Mohammad,
I understand that you are experiencing a file size difference and low quality images when saving figures in EPS file format. I am guessing that you have different MATLAB versions on your computers: the laptop having R2014b or later, and the other computer having R2014a or earlier.
With the new graphics system in R2014b also came changes to the way EPS files were created. In the new system, when saving as an EPS file, every data point on the figure contains more information than before. This can drastically increase the file sizes of figures that have large amounts of data. This new system does improve the majority of use-cases, but does cause issues for some people. The developers are aware of the memory issues, and are working on improving the system.
There could be multiple reasons for the quality issue you noticed. First, I would suggest trying to save the figure using the saveas or print commands rather than the File -> Save As menu option. The menu option automatically saves at screen resolution, while the programmatic save and print commands default to a higher resolution, and allow you to set it even higher if you wish.
Also, if your figure is sufficiently complex, the file may be saved as a raster (bitmap) image rather than vector graphics. This is done to improve performance, since saving very complex images as true vector graphics images can take a long time (and take up even more memory). To force the image to be saved as a true vector graphics, use the print command to save it and specify the renderer to be '-painters'.
The gray grid may be there in the figure, just not as visible. Before printing the figure, try:
grid off
It is also possible that the gray lines are an artifact of the EPS/PDF viewer's antialiasing. See this thread for more information on how to change the viewer's settings to remove the lines.
I hope that this helps point you in the right direction.
-Cam

Categories

Find more on Printing and Saving in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!