How can I avoid extra white lines when exporting a figure to a vector graphic?
8 views (last 30 days)
Show older comments
I have a Matlab figure that looks great as a figure, but when I try to export it to a vector-based format (.eps or .pdf) white swirly lines appear as can be seen in the linked PDF. Some of the black dots also get partially covered, despite being much higher in the 3D graph than everything else, but that can be easily fixed in Inkscape.
I have also attempted to generate a .pdf or .eps using my preferred method, through "export_fig," but have ended up with the same results. Any tips would be much appreciated! The .fig file has also been attached.
9 Comments
Josh
on 6 May 2024
Edited: Josh
on 9 May 2024
Saving directly from the GUI/figure did NOT produce the white lines (test.pdf)
Exporting via the command line with:
exportgraphics(fig,'testExport.pdf','ContentType','vector')
...did produce white lines (testExport.pdf)
not seeing the white lines in the figure though, they only showed up in the export (screenshot)
Can you confirm the process you're using? Also, not sure if it's just a difference beteween 2D and 3D plots, but the recent figure (3D) didn't include the same File menu dropdown options with the ability to Save As... EPS, SVG, etc. only image and PDF options
Answers (0)
See Also
Categories
Find more on Specifying Target for Graphics Output 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!