Actually I also tried to export it as .eps and .pdf vector format. But the exported looks terrible for it has a lot of horizontal dashed lines in it. Although in these two formats it is indeed exported as vector graph.
trouble exporting pcolor figure into vector format
42 views (last 30 days)
Show older comments
Hi! I've been trying pcolor to plot some phase diagrams, but having difficulty exporting the graph as vector graph when I use shading 'interp'. To be precise, if I code print -dmeta to copy the figure to the clipboard in .emf format, what I actually get is a bitmap graph instead of vector. However, if I change shading back into 'flat', then the exported turns out to be vector graph again. Does anyone have a clue what went wrong here?
2 Comments
Lemuel Carlos Ramos Arzola
on 13 Feb 2020
Edited: Lemuel Carlos Ramos Arzola
on 13 Feb 2020
Dear Yufan,
Regarding to the dashed lines in the pdf vector format, these are due to Adobe Acrobat (AA) configuration as was stated by Jan. You can disable the "Smooth line art" AA option and the problem will disapear. See the figures below
With dashed lines
Without dashed lines
Answers (2)
Jan
on 22 Apr 2012
The vector or pixel decision depends on the renderer. While ZBuffer and OpenGL produce nice 3D plots, they cannot export vector graphics. This is done by the Painters renderer only - even for EPS and PDF files. So set the renderer explicitly:
figure('Renderer', 'Painters')
Note, that the vector formats cannot represent 3D graphics exactly, because PostScript is a 2D language only. Mutual intersections of triangles will look disturbed.
Horizontal dashed lines in PDFs can be an artifact created by e.g. Acrobat Reader: Anti-aliasing of pictures produce these effects. This feature can be disabled in the options of Acrobat Reader.
2 Comments
Walter Roberson
on 22 Apr 2012
I seem to recall that shading of 'interp' requires OpenGL; OpenGL never produces vector graphics.
You might perhaps want to examine the MATLAB File Exchange contribution plt() as I believe that supports using hatching instead of shading.
Walter Roberson
on 22 Apr 2012
It is recommended that you use the MATLAB File Exchange contribution export_fig . The documentation for that indicates how to convert to vector format. It is not as straight-forward as one might hope.
0 Comments
See Also
Categories
Find more on Discrete Data Plots 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!