# How to export to an .eps file?

This is a followup question to this answer.

The code works great but I now want to export the resulting DensityPlot. I have tried clicking the plus on the right of the image and selecting paste snapshot and then to export it to an .eps using Export["~/Desktop/img.eps",%]. This created an image on my desktop but it was 97 Mb.

Is there a more simple way to export this plot and also to have a smaller file?

• I can't test it at the moment, but this sounds like it could be solved by the rasterizeBackground function from this question Jul 7 '21 at 17:08
• Why not define your fig: myFig = DensityPlot[..] then Export[~/Desktop/img.eps, myFig, "EPS"]? Try that. If it is too large, try .../img.png, myFig, "PNG"] Jul 8 '21 at 4:21