MATLAB: Using ‘painters’ for saving a file to EPS format does not give me the transparency I saw in the FIG file.

epsMATLABpainterspostscriptprinttransparency

I have a figure with transparency. I try to save it into EPS format by using 'print' and setting the 'renderer' as '-painters', as mentioned in the documentation link for 'print'. However, my EPS file does not give the transparency I saw in the FIG file. Why does this happen?

Best Answer

Postscript does not support transparency. Therefore, using '-painters' to generate an EPS figure using 'print' does not work.
A workaround is to use '-opengl', instead of '-painters'. Opengl creates an image of the onscreen figure. So, it is going to generate the 'eps' figure which will be the same as the FIG file.
A second workaround, depending on the workflow, is to export with PDF. 'Painters' supports transparency with 'pdf'.
It won't be identical to EPS, but to get a similarly sized output the user can try setting the figure's PaperSize to be the same as the figure's PaperPosition width and height.