Artifacts in figures exported as PDF from Matlab
Ältere Kommentare anzeigen
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
izaz ali shah
am 6 Aug. 2018
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.
Mohsin Shah
am 5 Apr. 2019
Good solution
Antworten (2)
Jan
am 8 Sep. 2011
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
Alexander Patrushev
am 8 Sep. 2011
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.
Alexander Patrushev
am 8 Sep. 2011
David Ahrens
am 12 Apr. 2016
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.
Jean-Francois Mercure
am 10 Feb. 2017
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)?
William Gatt
am 26 Feb. 2017
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.
Robert James
am 31 Mai 2017
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
am 18 Jul. 2018
I checked it with the solution given by Jan but the line is still there in my figure
izaz ali shah
am 6 Aug. 2018
Jan is right but instead of smooth images, unmark smooth line art
Le Kitsune
am 15 Aug. 2017
1 Stimme
For me this tool is doing the trick to get rid of the white lines:
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!