SCCN Home
EEGLAB home

Printing and Editing EEGLAB Figures

Printing: Because Matlab sometimes has printing problems, sending information from the Matlab figure GUI directly to the printer may cause Matlab to crash (in particular, under Linux). We usually print figures as Postcript files, then send the Postcript file to the printer (using the "lpr" Unix command, for example). For all figures, we recommend printing two copies, one Postcript (for printing) and one Matlab ".fig" file (which can be re-opened under Matlab later, for instance, to check the color limits of a 2-D image plot, recoup the data in the figure and replot it, etc...).

Editing: We usually use Adobe Illustrator (version 9 or 10) for post-editing Postscript figure files exported from Matlab, e.g. for publication. Some colleagues have also been using Canvas successfully to edit the same files. Although Illustrator can open Postcript files directly, there are two main limitations:

1. The sign of numbers is lost: When importing a Postcript figure, it seems Adobe Illustrator is unable to decode minus signs attached to numbers. Matlab advises using the option "adobecset" which fixes the problem (see the Matlab helpdesk message).

>> print -depsc2 -adobecset filename.eps

2. Complex figures with bitmaps or histograms are not saved as vector files when exporting Matlab graphics using the Postscript option:

Solution 1:

>> print -dill filename.ai

You may use the printing option "-dill" to print files compatible with Adobe Illustrator. However Illustrator does not recognize these files (they are in an old format), so you must convert them using this PERL conversion script. This sometimes works, but sometimes does not.

Solution 2: (our current favorite)

>> print -depsc2 -adobecset -painter filename.eps

Since it seems Matlab uses the 'painter' renderer to export in Illustrator format, we tried changed the renderer when exporting Postcript figure files It works -- we are able to export quite complex figures that otherwise would be exported as bitmaps. Note, however, that the 'painter' renderer has many limitations compared to the z-buffer and open-gl renderers. (See also Matlab help on selecting a renderer).

Matlab can also print or save in other graphic formats. We have not tried them all ('emf' under Windows, for instance).

Other details may be found on this SPM page.