Solution: Colormap missing during MATLAB figure export to Illustrator

I usually export my MATLAB figures to Adobe Illustrator .AI format. However, I have noticed that if my figure contains a colorbar, the colormap is blank when I open the AI file in Illustrator.

To fix this, I found that you can instead save the figure as an EPS file (*.eps, standing for Encapsulated PostScript). This file can be opened in Illustrator, and still contains all the layer and path information I need.

Another useful trick I use before exporting a figure with colormaps is to increase the step size of the colormap. By default, the colormap contains 64 colors, but you can usually see the edge between each color. To smooth out the colormap, I like to use:

colormap(gray(256))

This tells the colormap to use 256 colors instead of only 64. Of course, the colormap gray can be replaced by any other colormap name, e.g., hsv or jet.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

*