Export Matlab figures to Illustrator

New, since about 2022

To export a Matlab graphics object as vector graphics, use 

exportgraphics(obj, filename, 'ContentType', 'Vector')

For example, to export the current axes as a PDF, use:


See the help page here

In the olden days, before about 2022:

To export figures in Matlab to Illustrator, do the following:

Common issue: my plot comes through as an image instead of vector graphics! 

Solution: Set the 'renderer' of your figure to 'painters'. Suppose the figure you are viewing in Matlab is Figure 1 (viewing in Matlab, before you export). Then call set(1,'renderer','painters') and do your Save as..eps again.

Common issue: my image (like a photo or surface plot) comes through with low resolution!

Solution: save the image as a TIF ( imwrite(A,cmap,filename) ) and import the TIF to Illustrator. It's best to explicitly set the color map so that it comes through correctly in Illustrator.