Artifacts in figures exported as PDF from Matlab

Hello,
I have very annoying problem. I try to export high quality images with: print -painters -dpdf -r600 Test.pdf
and I used export_fig script as well, but there are always artifacts in figures like thin white lines over cells: Example

2 Kommentare

Hi guys... this is the problem of Pdf viewer, not Matlab. Use Adobe Acrobat reader, then follow the way like this, edit--->preferences-->page display--->rendering and unmark smooth line art.
Good solution

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Jan
Jan am 8 Sep. 2011

5 Stimmen

This is most likely not a problem of Matlab, but of the PDF viewer. If you are using Acrobat Reader, try to disable:
Edit -> Preferences -> Page Display -> Rendering -> Smooth images

10 Kommentare

Thanks Jan,
Actually not "Smooth images", but "Smooth line art" helped to resolve this problem while viewing pdf. But actually my purpose is to use this pdf in CorelDraw and when I import it there this artifact is presented. It happens with *.ps file too.
Do you know if there is like a global option for that?
Jan
Jan am 8 Sep. 2011
No, there is no global option. Every viewer of vector graphics uses an individual method to smooth the lines displayed on the screen. Tghe problem is that two neighboring lines are drawn with anti-aliasing, while the background is white. There is no 100 exact method to cover the background in this case: Either some pixels are too light (as in your case) or too dark, if the partial pixels at the edge overlap.
Fortunately the problem does not appear when printing with 300 or 600 dpi, because the rough paper is a kind of hardware anti-aliasing.
I assume CorelDraw has an option to control the anti-aliasing of vector graphics also.
Ok, Jan, thanks a lot!
I don't think this has been answered, found this link https://github.com/altmany/export_fig/issues/44 which clearly shows the problem is with matlab, and changing settings on other application is not a solution. In the past I have extensively used print function to eps to combine with Illustrator to produce layered pdf files. Now the files are huge can mathworks please give the option to produce the old style.
Jan
Jan am 17 Apr. 2016
Bearbeitet: Jan am 17 Apr. 2016
@David: I've seen several cases, where the anti-aliasing option of the view has been the problem, but in other cases Matlab caused the bad display.
It appears to me now impossible to publish any figure that has patch surfaces produced using Matlab in any serious journal that has requirements for quality artwork (e.g. Nature journals). Until Mathworks decides to give up the procedure of breaking up all shapes into hundreds or thousands of smaller shapes. As far as I can see, all pdf viewers that I can think of do not display correctly these images. It is not a solution to recommend using bitmap graphics (e.g. jpg) for journals, or to say that it is the fault of Adobe. What does Mathworks recommend scientists do to communicate their work (other than to use pre-2014a versions of matlab or re-write their data analysis code in another language)?
I was having the same problem. Saving a contour figure as a PNG produced a decent quality image (still inferior to pdf though). Maybe this helps.
The solution I've come up with to this 'white line artefact' problem is to leave everything in the Matlab image export setup as default and export eps figures (with artefacts). Following this I open these in the GIMP image manipulation program and here it provides the option to set any text or image anti-aliasing to none. This can then be exported as an EPS without any of the previous artefacts.
Not a very elegant solution I know, but useful for anyone who's needing to get their Matlab figures in a publication worthy format.
Mohsin Shah
Mohsin Shah am 18 Jul. 2018
I checked it with the solution given by Jan but the line is still there in my figure
Jan is right but instead of smooth images, unmark smooth line art

Melden Sie sich an, um zu kommentieren.

Le Kitsune
Le Kitsune am 15 Aug. 2017

1 Stimme

For me this tool is doing the trick to get rid of the white lines:

Kategorien

Tags

Gefragt:

am 8 Sep. 2011

Kommentiert:

am 5 Apr. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by