Closed dio-medes closed 2 years ago
export_fig uses Matlab's builtin print
function. In some situations (such as yours) where print
finds it difficult to vectorize the image, it incorporates a raster image in the PDF, instead of a vectorized representation.
Exporting to SVG format, or using exportgraphics(hFigure,filename,'ContentType','vector')
uses different mechanisms, both of which result in vectorized output.
I am trying to plot a parch(x,y,c) polygon on a line plot. I have a matrix called data oraginsed like the following:
The relevant matlab code looks like
The results are a very pixelated PDF. I suspect this is a problem with the way patch interacts with export_fig, as it also takes a relatively long time for this code to run compared to other figures.
Is this a bug or am I doing something wrong?
Note: reposted from mathworks discussion section.